Application_End() and Session_End () never execute ??

C

Chris

Hi,

I entered some logging-stuff in global.asax :
namely in Application_Start(), Application_End(), Session_Start() , etc
....

When I start the ASP.NET app from within Visual Studio does it Log very
nicely
Application_Start,
Application_BeginRequest ,
Session_Start,
Application_EndRequest

Refreshing the page in the browser :

Application_BeginRequest ,
Application_EndRequest

Starting a second browser (while the first browser is still open) :
Application_BeginRequest ,
Session_Start,
Application_EndRequest
==> so NO Application_Start() --> OK

but then ... closing the first browser --> no logging at all
==> so NO Session_End ???
closing the second browser --> no logging neither
==> so NO Session_End ??? NOR Application_End() ???

how come ?

starting a browser again :
Application_BeginRequest ,
Session_Start,
Application_EndRequest

==> NO Application_Start ???

does it mean that the app is still active in the background ?

thnx

Chris
 
A

Ashish M Bhonkiya

Hi Chris,
but then ... closing the first browser --> no logging at all
==> so NO Session_End ???
closing the second browser --> no logging neither
==> so NO Session_End ??? NOR Application_End() ???

how come ?

This is beacuse of the Session Time out. The browser is closed but the
session is still active till the session.Timeout is reached. (you may try
adding the "Session.Timeout = 1;" in protected void Session_Start method in
global.asax) Wait for one minute after closing the browser and after one
minute you should see the entry in the logging-stuff.
starting a browser again :
Application_BeginRequest ,
Session_Start,
Application_EndRequest

==> NO Application_Start ???

does it mean that the app is still active in the background ?
Application_Start will happen when any page is retrieved for the first time
after a webserver restart or the web.config file is changed.


Regards
Ashish M Bhonkiya
 

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,608
Members
45,252
Latest member
MeredithPl

Latest Threads

Top