在实现上传本地文件保存至服务器时,对于超大文件,IIS有限制,需要修改限制:
修改如下:
<system.web>
<compilation debug="true" targetFramework="4.5" />
<httpRuntime targetFramework="4.5" maxRequestLength="3145728" executionTimeout="120" />
</system.web>
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="3221225472" />
</requestFiltering>
</security>
</system.webServer>
注意,修改是在Web.config中进行,而不是web.config中,我因为配置错地方找了好久的原因