2016-04-07 186 views
-1

我在尝试调试我的应用程序时遇到了seuinte错误。HTTP错误404.13 - 未找到

HTTP错误404.13 - 找不到

请求筛选模块被配置为否认 超过请求内容大小的请求。

检查configuration/system.webServer/security/requestFiltering/[email protected] setting in applicationhost.config或web.config文件。

我的web.config

<system.webServer> 
    <modules> 
     <remove name="FormsAuthentication" /> 
     <remove name="ApplicationInsightsWebTracking" /> 
     <add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web" preCondition="managedHandler" /> 
    </modules> 
    <validation validateIntegratedModeConfiguration="false" /> 
    <security> 
     <requestFiltering> 
     <requestLimits maxAllowedContentLength="31457280"/> 
     </requestFiltering> 
    </security> </system.webServer> 

更多信息:

这和安全功能。不要变更小于变更的范围完全被理解。快速您可以将IIS服务器配置为拒绝其内容大于指定的嗡嗡声值的请求。如果请求内容大于设置的* Size ESSE错误返回。需要增加*内容大小,修改配置configuration/system.webServer/security/requestFiltering/[email protected] .

回答

3

你有

<configuration> 
    <system.web> 
     <httpRuntime maxRequestLength="1048576" /> 
    </system.web> 
</configuration> 

在你的配置也?我想你还需要将<httpRuntime maxRequestLength="1048576" />添加到yoru配置文件中。

我得到这个从这里 - Maximum request length exceeded

3

你需要你的应用程序来处理这么大的文件内调整maximumRequestLength财产。

知道maxAllowedContentLength以字节为单位,maximumRequestLength是以千字节度量时设置这些值,所以你需要相应地调整他们是非常重要的:

<configuration> 
    <system.web> 
     <!-- This will handle requests up to 1024MB (1GB) --> 
     <httpRuntime maxRequestLength="1048576" timeout="3600" /> 
    </system.web> 
</configuration> 

<!-- IIS Specific Targeting (noted by the system.webServer section) --> 
<system.webServer> 
    <security> 
     <requestFiltering> 
     <!-- This will handle requests up to 1024MB (1GB) --> 
     <requestLimits maxAllowedContentLength="1048576000" /> 
     </requestFiltering> 
    </security> 
</system.webServer>