Configuring Handler Mappings in IIS 7

Applies To: Windows 7, Windows Server 2008, Windows Server 2008 R2, Windows Vista

In IIS 7, handlers process requests made to sites and applications. Handlers map to resources on the Web server and generate responses for requests. Like modules, handlers are implemented by either native or managed components, such as DLLs or managed code.

When a client browser requests a file from the Web server, IIS determines which handler to use based on the ordered list of handler mappings in configuration. If there is an entry that matches the request type and extension (for example, a GET request for an .aspx file respectively), IIS calls the handler mapped to that request combination, and then invokes the associated mapped handler to process the request and return a result to the client browser.

IIS 7 includes common mappings for files, file name extensions, and directories to handlers for your sites and applications. For example, there are handler mappings to handle requests for files, such as HTML, ASP, or ASP.NET files, and also for requests that do not specify a file, such as directory browsing or returning a default document.

By default, the StaticFile handler or the Directory handler will handle a request when a client requests a file that has an extension or a directory that is not mapped to a handler. When a client requests a URL with a specific file but the extension does not map to a handler, the StaticFile handler will try to process the request. When a client requests a URL without specifying a file, the Directory handler will return either a default document or a directory listing depending on whether those options are enabled for the application. If you want a handler other than the StaticFile handler or the Directory handler to process a request, you can create a new handler mapping.

For information about the levels at which you can perform these procedures, and the modules, handlers, and permissions that are required to perform these procedures, see Handler Mappings Feature Requirements (IIS 7).

Community Additions