IIS Services: HTTP.sys, W3SVC, WAS, W3WP, oh my!
When client makes an HTTP request to IIS, there are many layers of drivers and services it travels through. In this blog, I wanted to give a high level overview of the major layers showing how they fit altogether.
Here is the high level flow:
HTTP.sys is the Kernel-mode HTTP/HTTPS protocol listener. HTTP.sys listens for HTTP requests from the network, passes the requests onto the next layer, and then returns processed responses to client browsers. Logs written into: C:\Windows\System32\LogFiles\HTTPERR
W3SVC is the World Wide Web (WWW) Publishing Service, the User-mode listener adapter for HTTP.sys. Logs written into: System Event Viewer
WAS, the Windows Process Activation Service, manages the application pool configuration and the worker processes (W3WP). Basically, WAS gathers all the configuration files, shown in picture below and creates an effective configuration and stores it in the C:\inetpub\temp\appPools\ directory. This enables you to use the same configuration and process model for HTTP and non-HTTP sites. Additionally, you can run WAS without the W3SVC if you do not need HTTP functionality. For example, you can manage a Web service through a WCF listener adapter, such as NetTcpActivator, without running the W3SVC if you do not need to listen for HTTP requests in HTTP.sys. If ApplicationHost.config changes, WAS receives a notification and updates the listener adapters with the new information. Logs written into: System Event Viewer
W3WP is the IIS Worker Process, aka Application Pool. Logs written into: System Event Viewer and IIS Logs in C:\intepub\logs\LogFiles\W3SVC*
Figure: Effective Configuration as seen by WAS
- Machine.config. This file is located in %windir%\Microsoft.NET\Framework\framework_version\CONFIG.
- Root Web.config for the .NET Framework. This file is located in %windir%\Microsoft.NET\Framework\framework_version\CONFIG.
- ApplicationHost.config. This file is located in %windir%\system32\inetsrv\config.
- Web.config files are located at the Same directory as the site, application, or directory
- The Effective Configuration by WAS is located at C:\inetpub\temp\appPools\
Hope this helps!