Marconcilio Souza
Marconcilio Souza

Reputation: 177

HTTP Error 404.13 - Not Found

I'm having the seuinte error when trying to debug my application.

HTTP Error 404.13 - Not Found

The request filtering module is configured to deny a request that exceeds the request content size .

Check configuration/system.webServer/security/requestFiltering/requestLimits@maxAllowedContentLength setting in applicationhost.config or web.config file.

My 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>

More Information:

This and a security feature . NOT Change a Less Than the scope of the change is fully understood. Fast You CAN configure IIS server to reject requests Whose content is greater than hum value specified . If the request content to Greater Than the set * Size ESSE error is returned. Required to Increase * Content size , modify the configuration configuration/system.webServer/security/requestFiltering/requestLimits@maxAllowedContentLength .

Upvotes: 3

Views: 15249

Answers (2)

thejustv
thejustv

Reputation: 2035

You'll need to adjust the maximumRequestLength property within your application to handle such large files.

It's important to know that maxAllowedContentLength is measured in bytes and maximumRequestLength is measured in kilobytes when settings these values so you'll need to adjust them accordingly:

<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>

Upvotes: 13

AndyC
AndyC

Reputation: 1335

Do you have

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

in your configuration also? I think you need to also add <httpRuntime maxRequestLength="1048576" /> to yoru config file.

I got this from here - Maximum request length exceeded

Upvotes: 3

Related Questions