IIS请求筛选模块被配置为拒绝超过请求内容长度的请求

1. 修改IIS的applicationhost.config
文件位置: %windir%/system32/inetsrv/config/applicationhost.config
找到<requestFiltering>节点,该节点下默认没有 <requestLimits maxAllowedContentLength=”上传大小的值(单位:byte)” /> 元素。为这个节点添加如下元素:<requestLimits maxAllowedContentLength=”2147483647″ /> (上传的大小将改为2G)

2. web.config中添加如下内容:
<configuration>
<system.web>
<httpRuntime maxRequestLength=”2097151″ executionTimeout=”120″/>
</system.web>
</configuration>

3. web.config中,把以下内容加在<system.webServer>节点
<security>
<requestFiltering >
<requestLimits maxAllowedContentLength=”2147483647″ ></requestLimits>
</requestFiltering>
</security>