Application_End would get called when the last resource of a web application has expired and is cleaned up by the .Net runtime.

It doesn't get fired anytime some one closes their browser. It does get fired once the last user of a web application's session has expired.

So if four people continously use a site, the application would never end.

But, if three left for work, their sessions would expire. The fourth person is the only person then using the application. Once the fourth person leaves, and his session expires (usually 20 mins after last use), then the application will probably be cleaned up by the .net runtime.

The only way to test this is to manually attach to the aspnet_wp thread.

Debug - Process - (select aspnet_wp), click Attach. Make sure the Common Language Runtime checkbox is selected and no others. Click OK, then Close the dialog box that appeared.

Set a breakpoint in your application_end event, then hit your site with your web browser by manually typing the url, wait 20 minutes, and hit should light up.