maxRequestLength 改为最大值后仍然超出,请教如何避免
maxRequestLength 改为最大值后仍然超出,请问如何处理?
maxRequestLength 最大只能设置为200MB左右,但是文件已经超出200MB,请问这个问题如何解决?
[最优解释]
IIS 的maxAllowedContent Length的缺省值为30000000 bytes. 上传大于这个长度的数据流被截断,导致文件或目录找不到。 下面添加
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="2097152000" maxQueryString="5000" maxUrl="8000"></requestLimits>
</requestFiltering>
</security>
</system.webServer>
代码:
<system.web>
<compilation debug="true" targetFramework="4.5.2"/>
<!--<httpRuntime targetFramework="4.5" maxRequestLength="512000" useFullyQualifiedRedirectUrl="true" executionTimeout="300" />-->
<httpRuntime targetFramework="4.5" maxRequestLength="512000" useFullyQualifiedRedirectUrl="true" executionTimeout="3600" />
</system.web>
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="2097152000" maxQueryString="5000" maxUrl="8000"></requestLimits>
</requestFiltering>
</security>
</system.webServer>
本文来自博客园,作者:零一の世界,转载请注明原文链接:https://www.cnblogs.com/ings/p/15695311.html

浙公网安备 33010602011771号