Setting IIS and ASP.NET POST Size Request Limits

IIS Setting: Request Limits

The first setting is the IIS Request Limit settings which is installed as part of the Request Filtering IIS Module. IIS Request Filtering is an optional IIS feature, but it is a required install feature when you install ASP.NET in IIS so you can assume it will be installed if ASP.NET is enabled in IIS.

The following sets the max POST buffer size to 500 megs. The value is specified in bytes.

            <requestLimits maxAllowedContentLength="500000000" />

ASP.NET Setting: httpRuntime maxRequestLength

ASP.NET uses the httpRuntime element to control a number of runtime related features including the allowed inbound request length. The inbound data size is checked very early in the request cycle and makes a request fail immediately.

        <httpRuntime maxRequestLength="500000000"  executionTimeout="120" />




IIS 7.5 – uploadReadAheadSize

IIS 7.5 – uploadReadAheadSize

A developer recently reported a problem that when a customer attempted to upload an attachment, they would sometime receive the error:

The page was not displayed because the request entity is too large.

In our case it did not include an error number, but it will sometimes include the error number:


The fix for us is listed below:

How to set the uploadReadAheadSize in IIS 7.5

  1. Launch “Internet Information Services (IIS) Manager”
  2. Expand the Server field
  3. Expand Sites
  4. Select the site you want to make the modification for.
  5. In the Features section, double click “Configuration Editor”
  6. Under “Section” select: system.webServer>serverRuntime
  7. Modify the “uploadReadAheadSize” section
  8. Click Apply
– Note that the value is in BYTES