修改IIS6.0預設檔案上傳200K限制

修改IIS6.0預設檔案上傳200K限制

如果你是跑win 2003 IIS 6.0的話,
不知道你是否也有遇過這問題,
就是上傳檔案的時候,如果檔案大於200KB就會出問題.

而解決的方法大致如下:

用文字編輯器開啟 C:\windows\sytem32\inetserv\metabase.xml
尋找字串 AspMaxRequestEntityAllowed
將 204800 (200KB) 改成你要的大小

而這是針對檔案上傳的部分,
如果你在下載檔案的時候,過大的檔案也有問題的話,
可以修改其中的 AspBufferingLimit ,
預設的是 4MB

相關資料
http://forum.discountasp.net/topic.asp?TOPIC_ID=371

節錄

IIS 6.0: upload and download issues If any of you are having issues with uploads and downloads with file sizes greater than 200K and are running IIS 6.0, try these solutions first: open up the file "metabase.xml" with notepad...should be located in C:\windows\sytem32\inetserv. Find the variable named "AspMaxRequestEntityAllowed", it's set at 204800 (200K) and change it to the desired size. And there you have it. For downloading Find the variable named "AspBufferingLimit" and change it to something greater than what is there. By default this is set to around 4 megs. By changing this variable you are increasing the max size of ASP response buffer, thus letting you download files greater than 4 megs. By increasing the number of these variables, you can controll the size of uploads and downloads (respectively).

A NOTE: Before making changes to this file. You must first go to IIS and right click the server and select properties. Check the box that says allow changes to MetaBase configuration while IIS is running. If you don't you will find that the metabase.xml file is locked. For good house cleaning you should go back and uncheck this after making your changes.