<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