Guy Schaller
Guy Schaller

Reputation: 4700

will application_end be called when all users session end?

i have a smqll question, will the application_end event in global.asax gets called when all users end there session?

was it like this in the past maybe?

Upvotes: 1

Views: 1703

Answers (1)

Rabid
Rabid

Reputation: 3034

From the MSDN ASP.NET Application Life Cycle Overview for IIS 5.0 and 6.0 Topic:

The Application_Start and Application_End methods are special methods that do not represent HttpApplication events. ASP.NET calls them once for the lifetime of the application domain, not for each HttpApplication instance.

Application_End Called once per lifetime of the application before the application is unloaded.

So it does not relate to when all user sessions have closed. It occurs when the application is unloaded from memory, i.e. as the result of a web.config or global.asax file change or ASP.NET recompilation, or, I presume, when the site is set to stopped from the web site management interface of IIS6.

Upvotes: 3

Related Questions