Roadmap › Networking & Hosting — How a Website Works, End to End › Module: Infrastructure Between the User and the App
Lessons in this course (12)
9. Web servers — IIS, Kestrel, Nginx and how ASP.NET is hosted
Intermediate★ Must knowLesson 9 of 12
| Server | Platform | Notes |
|---|---|---|
| IIS | Windows | Hosts ASP.NET (Framework) in the w3wp.exe worker process; app pools, bindings, Windows auth, URL Rewrite |
| Kestrel | Cross-platform | ASP.NET Core's built-in, fast server; can face the internet directly or sit behind a reverse proxy |
| HTTP.sys | Windows | Kernel-mode HTTP driver; ASP.NET Core can use it directly |
| Nginx / Apache | Linux mostly | Reverse proxy and static file server in front of Kestrel, Node, PHP |
IIS key concepts:
- Site — bindings (protocol + IP + port + host name, e.g.
https *:443 www.shop.comwith a certificate). - Application pool — the worker process (
w3wp.exe) running your app; isolation, identity (ApplicationPoolIdentity), recycling, .NET CLR version ("No Managed Code" for ASP.NET Core). - HTTP.sys receives requests in the kernel and queues them per app pool.
- ASP.NET Core Module (ANCM) — runs ASP.NET Core in-process (inside w3wp, fastest) or out-of-process (IIS proxies to Kestrel).
- web.config — module and handler settings; for Core it points IIS at
dotnet YourApp.dllor the app's exe.
xml
<!-- web.config generated by dotnet publish for ASP.NET Core on IIS -->
<configuration>
<system.webServer>
<handlers><add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" /></handlers>
<aspNetCore processPath="dotnet" arguments=".\Shop.Web.dll" stdoutLogEnabled="false" hostingModel="inprocess" />
</system.webServer>
</configuration>