Request Limits <requestLimits>

Overview

The <requestLimits> element specifies limits on HTTP requests that are processed by the Web server. These limits include the maximum size of a request, the maximum URL length, and the maximum length for a query string. In addition, the <requestLimits> element can contain a collection of user-defined HTTP header limits in the <headerLimits> element, which allows you to define custom settings on HTTP headers.

Note: When request filtering blocks an HTTP request because an HTTP request exceeds the request limits, IIS 7 will return an HTTP 404 error to the client and log one of the following HTTP statuses with a unique substatus that identifies the reason that the request was denied:

Setup

The default installation of IIS 7 and later includes the Request Filtering role service or feature. If the Request Filtering role service or feature is uninstalled, you can reinstall it using the following steps.

Windows Server 2012 or Windows Server 2012 R2

On the taskbar, click Server Manager.

In Server Manager, click the Manage menu, and then click Add Roles and Features.

In the Add Roles and Features wizard, click Next. Select the installation type and click Next. Select the destination server and click Next.

Windows Server 2008 or Windows Server 2008 R2

In the Web Server (IIS) pane, scroll to the Role Services section, and then click Add Role Services.

On the Select Role Services page of the Add Role Services Wizard, select Request Filtering, and then click Next.

On the Confirm Installation Selections page, click Install.

On the Results page, click Close.

Windows Vista or Windows 7

On the taskbar, click Start, and then click Control Panel.

In Control Panel, click Programs and Features, and then click Turn Windows Features on or off.

Expand Internet Information Services, then World Wide Web Services, and then Security.

Select Request Filtering, and then click OK.

How To

Note for IIS 7.0 users: Some of the steps in this section may require that you install the Microsoft Administration Pack for IIS 7.0, which includes a user interface for request filtering. To install the Microsoft Administration Pack for IIS 7.0, please see the following URL: