一、IIS6
修改web.config文件,可以指定对某个页面起作用
<configuration>
<location path="Upload.aspx">
<system.web>
<httpRuntime executionTimeout="3600" maxRequestLength="102400" />
</system.web>
</location>
</configuration>
二、IIS7.0
1.配置applicationHost.config
位置 C:\Windows\System32\inetsrv\config\applicationHost.config
查找 <section name="requestFiltering" overrideModeDefault="Deny" />
修改为 <section name="requestFiltering" overrideModeDefault="Allow" />
然后保存
2.修改web.config文件的maxRequestLength,可以指定对某个页面起作用,注意单位是kb
<configuration>
<location path="Upload.aspx">
<system.web>
<httpRuntime executionTimeout="3600" maxRequestLength="102400" />
</system.web>
</location>
</configuration>
3.修改web.config文件的maxAllowedContentLength,注意单位是byte
<system.webServer>
<security >
<requestFiltering>
<requestLimits maxAllowedContentLength="1024000000" />
</requestFiltering>
</security>
</system.webServer>
注:以上配置允许最大上传100MB,最大上传时间1小时
浙公网安备 33010602011771号