第二节还有类似的问题: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