Relation between w3wp.exe and IIS Application pool

leo del ciello 66 Reputation points
2021-10-08T14:56:56.377+00:00

I used to assume that for any application pool started on IIS a new w3wp.exe process is started.
Is it correct ?
in an Asp.net web application the Global.asax.cs ' Application_Start () method should be called any time the application pool to which the web application belongs is started.
Is it Correct ?

Internet Information Services
0 comments No comments
{count} votes

Accepted answer
  1. Lex Li (Microsoft) 4,742 Reputation points Microsoft Employee
    2021-10-08T20:09:30.163+00:00
    1. "any application pool started on IIS a new w3wp.exe process is started" is wrong. A started application pool can have no w3wp.exe. By default, IIS only starts a worker process w3wp.exe when an initial HTTP request arrives for that application pool. Note that IIS might start multiple w3wp.exe if this pool allows multiple worker processes when multiple requests arrive.
    2. "in an Asp.net web application the Global.asax.cs ' Application_Start () method should be called any time the application pool to which the web application belongs is started" is completely wrong. That method is only called when the first ASP.NET request arrives (a pure HTML/CSS request won't) which not only triggers the worker process to be created but also trigger ASP.NET runtime to be loaded. Merely starting the application pool won't trigger any of that.
    2 people found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful