ASP 在Windows 2003 server使用纯代码上传大文件遇到的错误,及解决方法

来源:互联网 发布:网络安全工程师 知乎 编辑:程序博客网 时间:2024/06/06 02:19
 

 

ASP错误:0104:0x80004005
最近论坛(DVBBS7.0SP2,Windows2003,IIS6.0)总在上传大文件时出错,论坛限制是500k,但往往传个200、300的文件就报错,错误提示是

Request 对象 错误 /'ASP 0104 : 80004005/'

不允许操作


/upload.inc,行 80

上网查到一篇文档,是这样写的:

'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:/Windows/System32/Inetsrv 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.


按照这个方法,问题很好地解决了
有几点要说明的:
必须先关闭IIS服务:

在IIS属性中选中“允许直接编辑配置数据库”,然后。在服务里关闭iis admin service服务

否则即使改动了metabase.xml文件也没有用,会提示文件正在使用无法保存

另外,ASPMaxRequestEntityAllowed参数是以比特作为单位的,默认的是204800,即200K

最后重启IIS
最好重启一下服务器iis admin service
Enjoy youself

附:微软解释
http://www.microsoft.com/downloads/details.aspx?FamilyId=56FC92EE-A71A-4C73-B628-ADE629C89499


ASP错误:0104:0x80004005
最近论坛(DVBBS7.0SP2,Windows2003,IIS6.0)总在上传大文件时出错,论坛限制是500k,但往往传个200、300的文件就报错,错误提示是

Request 对象 错误 /'ASP 0104 : 80004005/'

不允许操作


/upload.inc,行 80

上网查到一篇文档,是这样写的:

'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:/Windows/System32/Inetsrv 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.


按照这个方法,问题很好地解决了
有几点要说明的:
必须先关闭IIS服务:

在IIS属性中选中“允许直接编辑配置数据库”,然后。在服务里关闭iis admin service服务

否则即使改动了metabase.xml文件也没有用,会提示文件正在使用无法保存

另外,ASPMaxRequestEntityAllowed参数是以比特作为单位的,默认的是204800,即200K

最后重启IIS
最好重启一下服务器iis admin service
Enjoy youself

附:微软解释
http://www.microsoft.com/downloads/details.aspx?FamilyId=56FC92EE-A71A-4C73-B628-ADE629C89499