1、在IIS中打开“配置管理器”,从顶部的配置节中找到“system.webServer/security/requestFiltering”,将【maxAllowedContentLength】设置为2072576000(单位为byte)。
2、在web.config中配置以下内容:
<httpRuntime
maxRequestLength="2072576" //最大上传长度,单位为kb
useFullyQualifiedRedirectUrl="true"
executionTimeout="6000" //最大响应时间,单位为秒
minFreeThreads="8"
minLocalRequestFreeThreads="4"
appRequestQueueLimit="100"
enableVersionHeader="true"
/>
3、在web.config中配置以下内容:
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="2072576000"/>
</requestFiltering>
</security>
</system.webServer>