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

Canonical: https://scaplet.com/errors/http/413/iis

Guide Error · HTTP status codes

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

413 4xx · Client error

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](#which-iis-limit-fired)
2. [Raise the request filtering limit](#raise-the-request-filtering-limit)
3. [ASP.NET and ASP.NET Core limits](#asp-net-and-asp-net-core-limits)
4. [Verify the fix](#verify-the-fix)
5. [SEO and crawler notes](#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 with [ChatGPT](https://chatgpt.com/?hints=search&q=Summarize%20https%3A%2F%2Fscaplet.com%2Ferrors%2Fhttp%2F413%2Fiis%20(%22413%20Request%20Entity%20Too%20Large%20in%20IIS%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [Claude](https://claude.ai/new?q=Summarize%20https%3A%2F%2Fscaplet.com%2Ferrors%2Fhttp%2F413%2Fiis%20(%22413%20Request%20Entity%20Too%20Large%20in%20IIS%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [Perplexity](https://www.perplexity.ai/search?q=Summarize%20https%3A%2F%2Fscaplet.com%2Ferrors%2Fhttp%2F413%2Fiis%20(%22413%20Request%20Entity%20Too%20Large%20in%20IIS%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [![Google](/logos/ai/google-color.svg)AI Mode](https://www.google.com/search?udm=50&q=Summarize%20https%3A%2F%2Fscaplet.com%2Ferrors%2Fhttp%2F413%2Fiis%20(%22413%20Request%20Entity%20Too%20Large%20in%20IIS%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.)

_01_IIS and .NET request body limits

## Which IIS limit fired

Four layers can reject a large request on a Windows host. They use different units and report different codes, so identify the layer before you edit `web.config`.

Layer

### IIS request filtering

Setting

`requestLimits maxAllowedContentLength`

Default

30000000

Unit

bytes (about 28.6 MB)

Layer

### ASP.NET (System.Web)

Setting

`httpRuntime maxRequestLength`

Default

4096

Unit

KB (4 MB)

Layer

### ASP.NET Core, Kestrel

Setting

`MaxRequestBodySize`

Default

30,000,000

Unit

bytes (about 28.6 MB)

Layer

### Classic ASP

Setting

`asp limits maxRequestEntityAllowed`

Default

200000

Unit

bytes; exceeding it gives a 403

IIS's [status code](/glossary/http-status-codes) reference lists `413.0 Request entity too large`: the request is made by using a payload that is too large. Microsoft's `requestLimits` page adds a twist: when request filtering blocks a request over the limits, IIS returns an HTTP 404 to the client and logs a substatus, with `413.1 Content Length Too Large` for the [content length](/glossary/content-length) case. So the browser may not say 413, and the log is where you confirm it.

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

_03_Good 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() { /* ... */ }
```

Classic ASP is different

Classic ASP checks `maxRequestEntityAllowed`. If a `Content-Length` is larger, IIS returns an [HTTP 403](/errors/http/403), not a 413.

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

_05_Explained

## 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](/errors/http/413) 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. 01 [RFC 9110: HTTP Semantics](https://www.rfc-editor.org/rfc/rfc9110.html) rfc-editor.org · checked 2026-11-01
2. 02 [Request Limits <requestLimits>](https://learn.microsoft.com/en-us/iis/configuration/system.webserver/security/requestfiltering/requestlimits/) learn.microsoft.com · checked 2026-11-01
3. 03 [HTTP status codes in IIS 7.0 and later versions](https://learn.microsoft.com/en-us/troubleshoot/developer/webapps/iis/health-diagnostic-performance/http-status-code) learn.microsoft.com · checked 2026-11-01
4. 04 [HttpRuntimeSection.MaxRequestLength](https://learn.microsoft.com/en-us/dotnet/api/system.web.configuration.httpruntimesection.maxrequestlength) learn.microsoft.com · checked 2026-11-01
5. 05 [ASP.NET httpRuntime element](https://learn.microsoft.com/en-us/previous-versions/dotnet/netframework-4.0/e1f13641(v=vs.100)) learn.microsoft.com · checked 2026-11-01
6. 06 [Configure options for the ASP.NET Core Kestrel web server](https://learn.microsoft.com/en-us/aspnet/core/fundamentals/servers/kestrel/options) learn.microsoft.com · checked 2026-11-01
7. 07 [ASP Limits <limits>](https://learn.microsoft.com/en-us/iis/configuration/system.webserver/asp/limits/) learn.microsoft.com · checked 2026-11-01
8. 08 [How HTTP status codes affect Google's crawlers](https://developers.google.com/crawling/docs/troubleshooting/http-status-codes) developers.google.com · checked 2026-11-01

Questions

## Asked a lot.

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

_01_ What 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.

_02_ Why 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.

_03_ Do 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.

## Keep learning

[All errors](/errors)

[Learn 413 Request Entity Too Large HTTP status codes](/errors/http/413) [Related 4xx errors Status codes and links](/seo-issues/4xx-errors) [Read next 413 Request Entity Too Large in nginx HTTP status codes](/errors/http/413/nginx) [Do Run a free site audit Free, about two minutes](/site-audit)

Other 413 errors
[413 Payload Too Large on Cloudflare](/errors/http/413/cloudflare) [413 Request Entity Too Large](/errors/http/413) [413 Request Entity Too Large in Apache](/errors/http/413/apache) [413 Request Entity Too Large in nginx](/errors/http/413/nginx) [Vercel 413: FUNCTION_PAYLOAD_TOO_LARGE](/errors/cdn/vercel-payload-too-large)

More in 413 Request Entity Too Large
[413 Payload Too Large in Express](/errors/http/413/express) [413 Payload Too Large in PHP uploads](/errors/http/413/php) [413 Payload Too Large on Cloudflare](/errors/http/413/cloudflare) [413 Request Entity Too Large in Apache](/errors/http/413/apache) [413 Request Entity Too Large in IIS](/errors/http/413/iis) [413 Request Entity Too Large in nginx](/errors/http/413/nginx)

Terms on this page
[HTTP status codes](/glossary/http-status-codes) [Content-Length (HTTP header)](/glossary/content-length)

Free · 2 minutes

## Tools point. Agencies advise. _This one ships._

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

[Audit my site free](/site-audit)

Free, no card 60 seconds Nobody will call you

- **46** fixes shipped without a ticket Brightpipe
- **0→7** ChatGPT citations in six weeks Paylane
