第二節還有類似的問題:How to set the maxAllowedContentLength to 500MB while running on IIS7?如何更改IIS 7.0的maxAllowedContentLength?
不同的是,我已經在大小修改了我的web.config
接受文件高達2 GB,不過,當嘗試和上傳大文件時,我收到以下錯誤:
The request filtering module is configured to deny a request that exceeds the length of the content.
我web.config
是這樣的:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.web>
<httpRuntime executionTimeout="999999" maxRequestLength="2097151"/>
<customErrors mode="Off"/>
<compilation debug="true" strict="false" explicit="true" targetFramework="4.0" />
<membership>
<providers>
<clear/>
</providers>
</membership>
<profile>
<providers>
<clear/>
</providers>
</profile>
<roleManager enabled="false">
<providers>
<clear/>
</providers>
</roleManager>
</system.web>
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="2097151" />
</requestFiltering>
</security>
</system.webServer>
我仍然收到錯誤,當我嘗試上傳文件時,它只是131 MB
。
那麼,我應該在maxAllowedContentLength
設置中設置什麼讓人們上傳100 MB以上的文件呢?
你的權利,我甚至讀了它,它是在字節中,我仍然無視薩莉問題抱歉,但謝謝你的答案 – JUAN