突破IIS6上传文件尺寸限制
IIS 6 出于安全考虑, 默认最大请求200K(也即最大提交数据限额为200KByte, 204800Byte).
解决办法:
1. 关闭 IIS Admin Service 服务
2. 打开 \Windows\system32\inesrv\metabase.xml
3. 修改 ASPMaxRequestEntityAllowed 的值为自己需要的, 默认为 204800
4. 启动 IIS Admin Service
解决方法2 :
1. 新建文本文件:
'use VBS
set obj1=GetObject("winmgmts:/root/MicrosoftIISv2")
set obj2=obj1.get("IIsWebVirtualDirSetting='W3SVC/1/ROOT'")
'Output default value
WScript.Echo "ASPMaxRequestEntityAllowed Default Value: " & obj2.ASPMaxRequestEntityAllowed
'Reset the value
obj2.ASPMaxRequestEntityAllowed=1024000 ' set to 1mbyte, u can set to other what you want :)
' Save data
obj2.Put_()
'Output new value
WScript.Echo "ASPMaxRequestEntityAllowed New Value: " & obj2.ASPMaxRequestEntityAllowed
2. 保存为requestchange.vbs
3. 进入命令行, 运行:
cscript [path]requestchange.vbs
解决办法:
1. 关闭 IIS Admin Service 服务
2. 打开 \Windows\system32\inesrv\metabase.xml
3. 修改 ASPMaxRequestEntityAllowed 的值为自己需要的, 默认为 204800
4. 启动 IIS Admin Service
解决方法2 :
1. 新建文本文件:
'use VBS
set obj1=GetObject("winmgmts:/root/MicrosoftIISv2")
set obj2=obj1.get("IIsWebVirtualDirSetting='W3SVC/1/ROOT'")
'Output default value
WScript.Echo "ASPMaxRequestEntityAllowed Default Value: " & obj2.ASPMaxRequestEntityAllowed
'Reset the value
obj2.ASPMaxRequestEntityAllowed=1024000 ' set to 1mbyte, u can set to other what you want :)
' Save data
obj2.Put_()
'Output new value
WScript.Echo "ASPMaxRequestEntityAllowed New Value: " & obj2.ASPMaxRequestEntityAllowed
2. 保存为requestchange.vbs
3. 进入命令行, 运行:
cscript [path]requestchange.vbs
作者:Apollo
出处:http://apollo.cnblogs.com/
如果您觉得本文对您的学习有所帮助,可通过“微信”或“支付宝”打赏博主,或者点击页面右下角【好文要顶】支持博主。