IIS Request Handling Process Model

IIS (Internet Information Server) is one of the most powerful web servers from Microsoft that is used to host your ASP.NET Web application. IIS has it’s own ASP.NET Process Engine  to handle the ASP.NET request. So, when a request comes from client to server, IIS takes that request and process it and send response back to clients.

Worker Process (w3wp.exe): Worker Process (w3wp.exe) runs the ASP.Net application in IIS. This process is responsible to manage all the request and response that are coming from client system. In short, Worker process is the heart of ASP.NET Web Application which runs on IIS.

Application Pool: Application pool is the container of worker process. Application pool is used to separate the sets of IIS worker processes that share the same configuration. This makes sure that the particular web application doesn’t impact other web application.

Note: One Application Pool can have one or many Worker Processes. An application pool with more than one worker process is called ‘Web Garden’.

HTTP.SYS Process: HTTP.SYS resides in Kernel Layer of IIS. HTTP.SYS is responsible for pass the request to particular Application pool. It contains the ID of each Application Pool. (Whenever we creates a new Application Pool, the ID of the Application Pool is being generated and it’s registered with the HTTP.SYS).

ISAPI extensions: ISAPI extensions are the IIS way to handle requests for different resources. Once ASP.NET is installed, it installs its own ISAPI extension (aspnet_isapi.dll) and adds the mapping into IIS.

IIS Request Handling Process Model
IIS Request Handling Process Model

 

Flow of ASP.NET Request:

 

1. Client Request hits the web server. Internally this request comes to Kernel Layer of IIS means at HTTP.SYS.
2. HTTP.SYS indentifies the name and ID of Application Pool for that ASP.NET Request.
3. Now Request comes to user level of IIS. WAS (Web Admin Service) puts the request from HTTP.SYS to Application Pool.
4. When Application pool receives the request, it simply passes the request to worker process (w3wp.exe).
5. The worker process “w3wp.exe” looks up the URL of the request in order to load the correct ISAPI extension (aspnet_isapi.dll).
6. ISAPI creates an HTTPRuntime Object to Process the request via HTTPModule and HTTPHanlder.HTTPRuntime is an entry point of the application.

 

Note: After these steps, after that the ASP.NET Page LifeCycle events starts.

Leave a Reply

Your email address will not be published. Required fields are marked *