最近发现在项目中使用jQuery.form插件上传比较大的文件时,上传不了,于是改了下web.config的上传文件最大限制。
<configuration>
<system.web>
<httpRuntime maxRequestLength="102400" executionTimeout="200" enable="true" />
</system.web>
</configuration>
改完后还是不能上传,最后在stackoverflow找到了答案,原来还要配置服务端的最大文件限制。
譬如限制最大文件为100M
<configuration>
<system.web>
<httpRuntime maxRequestLength="102400" executionTimeout="200" enable="true" />
</system.web>
</configuration>
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="104857600" />
</requestFiltering>
</security>
</system.webServer>
stackoverflow答案地址:http://stackoverflow.com/questions/23327338/maxrequestlength-for-net-4-5-1-framework
转自:http://Www.CnBlogs.Com/WebEnh/
如果想下次快速找到我,记得点下面的关注哦!
| 本博客Android APP 下载 |
![]() |
| 支持我们就给我们点打赏 |
![]() |
| 支付宝打赏 支付宝扫一扫二维码 |
![]() |
| 微信打赏 微信扫一扫二维码 |
![]() |
如果想下次快速找到我,记得点下面的关注哦!





浙公网安备 33010602011771号