Application_End

A

AGB

Hi all,

Can't seem to determine if the Application_End is gaurenteed to run. I
have some cleanup code there but it doesn't execute if I close my
browser and am the last session.


???
 
N

Natan

AGB said:
Hi all,

Can't seem to determine if the Application_End is gaurenteed to run. I
have some cleanup code there but it doesn't execute if I close my
browser and am the last session.

Application_End occours when the last instance of the application
context ends. This occours only when you restart your iis application,
not when you close the browser.
 
M

Marina

The application ends after a timeout of not getting any requests. Not
necessarily when all the sessions occur.

And incidentally, closing the browser is in no way related to killing the
session. The session will end when it times out due to inactivity.
 
S

Stu

Natan is correct..
When your app leaves its memory space (IIS restarting a primary cause),
App_end is called.
 
J

Juan T. Llibre

AGB,

Do your cleanup code in Session_OnEnd,
not in Application_End.




Juan T. Llibre
ASP.NET MVP
===========
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,268
Latest member
AshliMacin

Latest Threads

Top