Joh*_*g43 1 c# asp.net iis asp.net-mvc asp.net-mvc-4
我遇到最大请求长度超出错误的问题,当我尝试在我的.net mvc应用程序中上传超过3-4张照片时,我得到:
Server Error in '/' Application.
Run Code Online (Sandbox Code Playgroud)
我找到了IIS 7的解决方案:
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="1073741824" />
</requestFiltering>
</security>
</system.webServer>
Run Code Online (Sandbox Code Playgroud)
我尝试将其添加到我的web.config中,但可能不适用于IIS 10,或者我做错了,因为我仍然是新手。
我解决了,只需将这个maxRequestLength =“ 214748364”添加到web.config中:
<system.web>
<httpRuntime targetFramework="4.5.2" maxRequestLength="214748364" />
</system.web>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2630 次 |
| 最近记录: |