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

IIS 6.0 突破 200KB 上傳與 4MB 下載限制:Metabase.xml 兩參數快速調整

編輯:Server 2003

IIS 6.0 預設為高安全模式,ASP 上傳限制 AspMaxRequestEntityAllowed = 204,800 Bytes(200KB),回應緩衝限制 AspBufferingLimit = 4,194,304 Bytes(4MB),導致大檔上傳/下載失敗。本文提供標準調整流程,修改 MetaBase.xml 兩個關鍵屬性即可解除限制。

調整前提

  • 需以管理員身分操作。
  • 必須先停止 IIS Admin Service,否則變更不生效且可能損毀 Metabase。
  • 使用純文字編輯器(Notepad++、VS Code、UltraEdit)開啟 %windir%\system32\inetsrv\MetaBase.xml。

一、解除上傳 200KB 限制

  1. 「服務」(services.msc) → 停止 IIS Admin Service(WWW 發佈服務等相依服務會一併停止)。
  2. 編輯 MetaBase.xml,搜尋 AspMaxRequestEntityAllowed。
  3. 修改值為所需位元組數,例如:
    AspMaxRequestEntityAllowed="20480000" (20 MB)
    AspMaxRequestEntityAllowed="104857600" (100 MB)
  4. 儲存檔案,重新啟動 IIS Admin Service(相依服務自動跟隨啟動)。

二、解除下載/回應 4MB 限制

  1. 同樣先停止 IIS Admin Service。
  2. 編輯 MetaBase.xml,搜尋 AspBufferingLimit。
  3. 修改值,例如:
    AspBufferingLimit="20480000" (20 MB)
    AspBufferingLimit="52428800" (50 MB)
  4. 儲存,重新啟動 IIS Admin Service。

三、驗證與注意事項

  • 測試上傳/下載大於原限制的檔案,確認無誤。
  • 過大數值可能導致記憶體耗盡(ASP 回應緩衝佔用非分頁集區),建議依實際業務最大檔案大小 + 20% 余量設定。
  • 若網站使用 ASP.NET,另需調整 web.config 中 <httpRuntime maxRequestLength="..." />(單位 KB)與 <security><requestFiltering><requestLimits maxAllowedContentLength="..." /></requestFiltering></security>(單位 Bytes)。
  • 修改 Metabase.xml 前建議備份原檔,便於快速回滾。

兩參數調整即時生效,無需重開機,是 IIS 6.0 維運人員必備的大檔傳輸調校技能。

Copyright © Windows教程網 All Rights Reserved