解决iis不能上传大文件的方法

尝试修改学院使用的CMS 发现很长的文章发布不出来 查询资料后发现IIS默认只允许上传200k左右的post数据
既然知道了如此 解决方法也就变得很简单了:

1)Down掉IIS Admin服务
2)修改x:WindowsSystem32Inetsrvmetabase.xml文件 将“AspMaxRequestEntityAllowed”的值改为“1073741824”(这是1GB 吼吼……注意这里的单位是字节)
3)重新启动IIS Admin服务 重启WWW服务,搞定。

在这里还有一个细节要注意,就是修改这个Metabase.xml时一定要保存为utf-8编码的文件,否则会造成IIS Admin服务无法启动~~~

资料原文如下:

'ASP 0104 : 80004005' Operation not Allowed Solution

Question:
--------------------------------------------------------------------------------
Request object error 'ASP 0104 : 80004005'
Operation not Allowed
Answer:
--------------------------------------------------------------------------------

Yes, Pure ASP Upload supports uploading large files on the Windows 2003 server. However:

IIS6.0 prevent the upload of files more than +200Kb. So you need to make some changes in the default IIS settings first.

Background
For IIS6.0 users, the AspMaxRequestEntityAllowed property specifies the maximum number of bytes allowed in the entity body of an ASP request. If a Content-Length header is present and specifies an amount of data greater than the value of AspMaxRequestEntityAllowed, IIS returns a 403 error response.

This property is related in function to MaxRequestEntityAllowed, but is specific to ASP request. Whereas you might set the MaxRequestEntityAllowed property to 1 MB at the general World Wide Web Publishing Service (WWW Service) level, you may choose to set AspMaxRequestEntityAllowed to a lower value, if you know that your specific ASP applications handle a smaller amount of data.

Solution
Open your metabase.XML which is located in c:WindowsSystem32Inetsrv find the line "AspMaxRequestEntityAllowed" and change it to "1073741824". This is 1GB - of course you can enter another value to suite your needs.

NOTE: Before you edit the file, be sure to stop the IIS service first or else you won't be able to save the file.


发表评论

(必填)

(必填)

(以便回访)