2011年7月17日 星期日

IIS 7無法上傳超過30MB 檔案

網站由windows 2003換到windows 2008後, 上傳大旳檔案時會出現404 not found的錯

web.config httpruntim 有設定maxlength, 但仍無法上傳, google 到此篇
以下是更改設定指令.

REM切換到appcmd目錄
cd c:\Windows\systems32\inetsrv

REM 先備份IIS設定
appcmd add backup test20110718

REM 查看IIS備份紀錄是否存在
appcmd list backup

REM 先查主機的SiteName及APP list
appcmd list app

REM 查看目前上傳設定,找關鍵字requestLimits
appcmd list config "Default Web Site/mySite" -section:requestFiltering

REM 更改size 單位為byte ,以下為100MB左右
appcmd set config "Default Web Site/mySite" -section:requestFiltering -requestLimits.maxAllowedContentLength:102400000 -commitpath:apphost



沒有留言:

張貼留言

離線安裝SSMS 22 launched extracted application exiting with result code 0x138b

SSMS 22 安裝器下載頁面 https://learn.microsoft.com/zh-tw/ssms/install/install https://aka.ms/ssms/22/release/vs_SSMS.exe 將安裝檔下載到本機,檔案好大2.5G  https:...