解决文件大小上传限制

内容长度超过配置的值(IIS 7 默认文件上传大小时30M)

web.config中,把以下内容加在 <system.webServer>节点

<security>
<requestFiltering >
<requestLimits maxAllowedContentLength="2147483647" ></requestLimits>

上述中maxAllowedContentLengt是以字节为单位。
web.config中添加如下内容:

<configuration>
  <system.web>
     <httpRuntime maxRequestLength="2097151" executionTimeout="120"/>
  </system.web>
</configuration>

maxRequestLength (指示 ASP.NET 支持的最大文件上载大小)
默认值为 4096 (4 MB),最大值只能是2097151K。
posted @ 2016-03-18 15:20  copperface  阅读(711)  评论(0编辑  收藏  举报