IIS Request Processing

This topic describes how a client request is processed on an IIS server.

Request Processing by Type of Request

The following table describes what happens once an IIS process receives a request to be executed.

Request

Action

HTML Page

IIS returns the page in HTML format.

A file whose extension is mapped to a particular ISAPI extension, such as Asp.dll

IIS loads the appropriate DLL file and presents the request through the Extension_Control_Block data structure. For example, the .asp extension is mapped to Asp.dll, so that all requests for files with an .asp extension will be directed to Asp.dll. The .stm and .shtm extensions are mapped to the Ssinc.dll.

ISAPI extension

IIS loads the ISAPI DLL (if it is not already running) and the request is sent to the extension through the EXTENSION_CONTROL_BLOCK Structure data structure.

CGI application

IIS creates a new process. IIS will then provide the query string and other parameters that are included with the request through the environment and standard input (STDIN) handle for the process.

ISAPI filters are always loaded as long as the Web service is running and a request to the server has been made.

Preliminary Request Processing on IIS 6.0 in Workder Process Isolation Mode

Before an IIS process receives a request to execute, some preliminary processing occurs that is described in the following steps:

  1. A request arrives at HTTP.sys.

  2. HTTP.sys determines if the request is valid. If the request is not valid, it sends a code for an invalid request back to the client.

  3. If the request is valid, HTTP.sys checks to see if the request is for static content (HTML) because static content can be served immediately.

  4. If the request is for dynamic content, HTTP.sys checks to see if the response is located in its kernel-mode cache.

  5. If the response is in the cache, HTTP.sys returns the response immediately.

  6. If the response is not cached, HTTP.sys determines the correct request queue, and places the request in that queue.

  7. If the queue has no worker processes assigned to it, HTTP.sys signals the WWW service to start one.

  8. The worker process pulls the request from the queue and processes the request, evaluating the URL to determine the type of request (ASP, ISAPI, or CGI).

  9. The worker process sends the response back to HTTP.sys.

  10. HTTP.sys sends the response back to the client and logs the request, if configured to do so.

Preliminary Request Processing on IIS 6.0 in IIS 5.0 Isolation Mode and Earlier Versions of IIS

The request processing of IIS 6.0 running in IIS 5.0 isolation mode is nearly identical to the request processing in IIS 5.1, IIS 5.0, and IIS 4.0. Before an IIS process receives a request to execute, some preliminary processing occurs that is described in the following steps:

  1. A request arrives. If the requested application is running in-process, then Inetinfo.exe takes the request. If not, then DLLHost.exe takes the request.

  2. Inetinfo.exe or DLLHost.exe determines if the request is valid. If the request is not valid, it sends a code for an invalid request back to the client.

  3. If the request is valid, Inetinfo.exe or DLLHost.exe checks to see if the response is located in the IIS cache.

  4. If the response is in the cache, it is returned immediately.

  5. If the response is not cached, Inetinfo.exe or DLLHost.exe processes the request, evaluating the URL to determine if the request is for static content (HTML), or dynamic content (ASP, ASP.NET or ISAPI).

  6. The response is sent back to the client and the request is logged, if IIS is configured to do so.