Working with .Net applications deployed on IIS now, I decided to refresh memories about IIS architecture. It can be helpful to any .NET developer.
IIS 7 and above have a similar HTTP request-processing flow as IIS 6.
Here is the diagram, with steps explanation below it.
- When a client browser initiates an HTTP request for a resource on the Web server, HTTP.sys intercepts the request.
- HTTP.sys contacts WAS to obtain information from the configuration store.
- WAS requests configuration information from the configuration store, applicationHost.config.
- The WWW Service receives configuration information, such as application pool and site configuration.
- The WWW Service uses the configuration information to configure HTTP.sys.
- WAS starts a worker process for the application pool to which the request was made.
- The worker process processes the request and returns a response to HTTP.sys.
- The client receives a response.
In a worker process, an HTTP request passes through several ordered steps, called events, in the Web Server Core. At each event, a native module processes part of the request, such as authenticating the user or adding information to the event log. If a request requires a managed module, the native ManagedEngine module creates an AppDomain, where the managed module can perform the necessary processing, such as authenticating a user with Forms authentication. When the request passes through all of the events in the Web Server Core, the response is returned to HTTP.sys.
Diagram 2, below, shows an HTTP request entering the worker process.
It’s just a small piece of IIS architecture.For more information about IIS go to Introduction to IIS