Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學
您现在的位置: Windows教程網 >> Windows教程 >  >> Windows 綜合教學 >> 關於 Windows

Windows Server 2003 IIS ASP 上傳 200KB 限制突破:修改 Metabase.xml ASPMaxRequestEntityAllowed

編輯:關於 Windows

Windows Server 2003 預設將 ASP 最大請求實體限制為 200 KB (204,800 bytes),導致大檔上傳失敗。需停止 IIS、修改 Metabase.xml 設定值、重啟 IIS 即可突破限制。

操作步驟

  1. 開啟「服務」 (services.msc) → 找到 IIS Admin Service → 停止 (會連帶停止 WWW 發佈服務等)。
  2. 以記事本開啟 C:\WINDOWS\system32\inetsrv\MetaBase.xml。
  3. 搜尋 ASPMaxRequestEntityAllowed,預設值 204800 (200 KB)。
  4. 修改為所需位元組數,例:104857600 (100 MB) 或 1073741824 (1 GB)。
  5. 存檔關閉記事本。
  6. 執行 iisreset (或重啟 IIS Admin Service) 使設定生效。

Metabase.xml 修改 ASPMaxRequestEntityAllowed

注意事項

  • 修改前務必備份 MetaBase.xml。
  • 若網站同時啟用 ASP.NET,另需調整 machine.config 或 web.config 中 <httpRuntime maxRequestLength="..." /> (單位為 KB)。
  • 過大數值可能導致惡意大檔上傳佔滿磁碟,建議設定合理上限並配合應用層驗證。
Copyright © Windows教程網 All Rights Reserved