上傳檔案 > 200KB 時出現:
Request object error 'ASP 0104 : 80004005'
Operation not allowed
IIS 6.0/7.0 預設 AspMaxRequestEntityAllowed = 204800 (200KB),超過即拒絕請求。此限制僅影響無組件上傳(如 Request.BinaryRead),使用 ASPUpload、Persits Upload 等 COM 組件上傳不受限。
net stop iisadmin /yC:\Windows\System32\inetsrv\metabase.xmlAspMaxRequestEntityAllowed,修改值 (單位:位元組):
<IIsWebService ... AspMaxRequestEntityAllowed="1073741824" /> <!-- 1GB -->
net start w3svc1073741824 = 1GB)web.config:
<system.webServer>
<asp>
<limits maxRequestEntityAllowed="1073741824" />
</asp>
</system.webServer>
AspMaxRequestEntityAllowed 專門限制 ASP 請求實體大小MaxRequestEntityAllowed (WWW 服務層級) 限制所有請求 (含 ASPX、靜態檔)若使用動易、LeadCMS 等系統,上傳大檔同樣受限。修改後仍失敗請檢查:
httpRuntime maxRequestLength (預設 4MB,在 web.config)調大限制會增加 DoS 風險,建議:
AspRequestQueueMax 限制佇列長度修改 Metabase 或 IIS 設定後重啟相關服務即可生效,徹底解決 ASP 經典上傳大小限制問題。