Free auditStart free
GuideError · HTTP status codes

413 Request Entity Too Large in IIS

Fix an IIS 413 or upload limit: maxAllowedContentLength, ASP.NET maxRequestLength, Kestrel and classic ASP limits, each with its unit and default.

3 min
read
8
sources
Oct 31, 2026
updated
Scaplet Editorial Team
author
The short answer

IIS has several upload limits in different units. Request filtering's maxAllowedContentLength defaults to 30000000 bytes, ASP.NET's maxRequestLength to 4096 KB, ASP.NET Core's Kestrel limit to 30,000,000 bytes, and classic ASP's maxRequestEntityAllowed returns a 403. Raise the one that fires, in the right unit, and mind that IIS may show a 404 for the request filtering case.

  1. Which IIS limit fired
  2. Raise the request filtering limit
  3. ASP.NET and ASP.NET Core limits
  4. Verify the fix
  5. SEO and crawler notes
30-second check

Where does your site stand?

Four quick questions, then a straight answer.

1/4Have you checked your own site for this?
Summarize this page withChatGPTClaudePerplexityGoogleAI Mode
02Check it

Raise the request filtering limit

You can also edit it in IIS Manager: select the site, open Request Filtering, then choose Edit Feature Settings in the Actions pane.

The value is in bytes. 300 MB is 300 x 1024 x 1024 = 314572800. Setting it for the whole server is rarely needed; set it on the site or the upload path.

web.config: allow up to 300 MB (314572800 bytes)
<configuration>
  <system.webServer>
    <security>
      <requestFiltering>
        <requestLimits maxAllowedContentLength="314572800" />
      </requestFiltering>
    </security>
  </system.webServer>
</configuration>
03Good to know

ASP.NET and ASP.NET Core limits

The ASP.NET Core docs call the attribute the recommended way to override the limit in an MVC app, and warn that changing the limit after the app has started reading the request throws. Set both the IIS and the app limit, or the lower one wins. For maxRequestLength, Microsoft describes it as a limit for the input stream buffering threshold, with 4096 KB as the default.
ASP.NET Framework: maxRequestLength is in KB, keep it in step
<system.web>
  <httpRuntime maxRequestLength="307200" />
</system.web>
ASP.NET Core: Kestrel limit and a per-action override
builder.WebHost.ConfigureKestrel(serverOptions =>
{
    serverOptions.Limits.MaxRequestBodySize = 100_000_000;
});

// or per action
[RequestSizeLimit(100_000_000)]
public IActionResult Upload() { /* ... */ }
04How it works

Verify the fix

  1. 1

    Look at the log

    Find the failing request in the IIS log for the site and read the status and substatus columns.

  2. 2

    Change one layer

    Raise the layer the log points to, using bytes for IIS and Kestrel and KB for maxRequestLength.

  3. 3

    Retest with a known size

    Send a file just over the old limit and under the new one; confirm a 2xx.

  4. 4

    Check anything in front

    A load balancer or CDN may have its own body limit; test the origin directly.

05Explained

SEO and crawler notes

Google ignores the content of URLs returning 4xx and drops them from the index over time. A body size error only blocks uploads and form posts, not normal crawling, unless a page requires a large POST to render. See 413 Request Entity Too Large for the general status.
Sources · 8

Every fact, linked and dated.

Official docs first. The date is when we last opened each page.
  • rfc-editor.org
  • microsoft.com
  • google.com
  1. 01RFC 9110: HTTP Semanticsrfc-editor.org · checked 2026-11-01
  2. 02Request Limits <requestLimits>learn.microsoft.com · checked 2026-11-01
  3. 03HTTP status codes in IIS 7.0 and later versionslearn.microsoft.com · checked 2026-11-01
  4. 04HttpRuntimeSection.MaxRequestLengthlearn.microsoft.com · checked 2026-11-01
  5. 05ASP.NET httpRuntime elementlearn.microsoft.com · checked 2026-11-01
  6. 06Configure options for the ASP.NET Core Kestrel web serverlearn.microsoft.com · checked 2026-11-01
  7. 07ASP Limits <limits>learn.microsoft.com · checked 2026-11-01
  8. 08How HTTP status codes affect Google's crawlersdevelopers.google.com · checked 2026-11-01
Questions

Asked a lot.

3 questions people ask next, answered from the sources on this page.

01What is the default upload limit in IIS?

Request filtering's maxAllowedContentLength defaults to 30000000 bytes, about 28.6 MB. ASP.NET's maxRequestLength defaults to 4096 KB.

02Why do I see 404 instead of 413 in IIS?

Microsoft's requestLimits documentation says request filtering returns an HTTP 404 to the client for requests over the limits and logs a substatus such as 413.1 Content Length Too Large. Check the log.

03Do I need to change both web.config limits?

Change the layer that rejects the request. Hosting ASP.NET Core under IIS means both IIS request filtering and Kestrel can apply, so raise both if you raise either.

Free · 2 minutes

Tools point. Agencies advise. This one ships.

Run the free audit, then approve the fixes. Every change can be undone.

Free, no card60 secondsNobody will call you
  • 46 fixes shipped without a ticket Brightpipe
  • 0→7 ChatGPT citations in six weeks Paylane