Hasan Shouman
Hasan Shouman

Reputation: 2362

ASP.NET Application Start

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?

Upvotes: 0

Views: 736

Answers (1)

browsermator
browsermator

Reputation: 1354

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://learn.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)

Upvotes: 2

Related Questions