在最外层的web.config页面添加
<system.web>
<httpRuntime targetFramework="4.5" requestValidationMode="2.0" maxRequestLength="104857600" executionTimeout="360000" />
</system.web>
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="104857600" />
</requestFiltering>
</security>
</system.webServer>
MaxAllowedContentLength和maxRequestLength数值相等,单位是byte