Home > Net >  ASP.NET Application Start
ASP.NET Application Start

Time:06-16

I know that ASP.NET MVC application_start() event is called when the application starts, but I did not find any answer that explains what is meant by "start"? Does it mean when the IIS starts, when the "application" in the IIS is started/restarted, or when the first user requests the website?

If there is one user connected to the website and he closed the browser, then if the website is called again by him or another user with no other users connected, will this event be called?

CodePudding user response:

There's an application pool timeout that controls when it shuts down. If zero users hit the site in X amount of minutes the app will shutdown... then when the next user hits the site there will be a pause while the app starts up again. Default is 20 minutes: https://docs.microsoft.com/en-us/iis/get-started/whats-new-in-iis-85/idle-worker-process-page-out-in-iis85 (same for old .net or core)

  • Related