2016-04-07 184 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>