我有一个页面,用户可以上传文件到服务器。我指定了
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="512000"></requestLimits>
</requestFiltering>
</security>在我的Web.config中,但我仍然得到一个错误,请求太大。我找到了一个解决方案-更改系统文件applicationHost.config。我设置了
<requestLimits maxAllowedContentLength="512000000">它解决了我的问题。但是我们不能在开发服务器上修改这个文件。我找到了一些解决方案,例如使用
<clear/>或
<remove name="..."> 在我的Web.config
<security>
<requestFiltering>
<clear/>
<requestLimits maxAllowedContentLength="512000"></requestLimits>
</requestFiltering>
</security>但现在我得到了
HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.发布于 2013-03-22 21:43:23
我认为你需要设置
<configuration>
<system.web>
<httpRuntime maxRequestLength="2097151" />
</system.web>
</configuration>而不是。这是2 2GB我认为这是最大的。
https://stackoverflow.com/questions/15570882
复制相似问题