By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,953 Members | 1,564 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,953 IT Pros & Developers. It's quick & easy.

Application on end & session not firing

P: n/a

HI,

am using a simple project in asp.net using c#.

if i put the break point in the application start & session start event
, they are firing good .BUT WHEN i close my project while running on IE,
the session end & application end event are not firing even though i put
the break point there.

Could u give me the solution for this how i could trace those.

With Regards
Raghu
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Hello Raghu,

Those events are not fired when you close the project, the Session OnEnd is fired when the session times out or is closed explicitly using Session.Abandon(). To trigger the Application End event, you should restart the web site or the IIS service.
Try calling Session.Abandon() from a webform.

Greeting!
-----
Ariel Popovsky

HI,

am using a simple project in asp.net using c#.

if i put the break point in the application start & session start
event , they are firing good .BUT WHEN i close my project while
running on IE, the session end & application end event are not firing
even though i put the break point there.

Could u give me the solution for this how i could trace those.

With Regards
Raghu
*** Sent via Developersdex http://www.developersdex.com *** Don't just
participate in USENET...get rewarded for it!


Nov 18 '05 #2

P: n/a
"Raghu Raman" <ra************@rediffmail.com> wrote in message
news:%2******************@TK2MSFTNGP10.phx.gbl...
Could u give me the solution for this how i could trace those.


Your Session doesn't end just by closing your browser or your Web project -
the Session will end when you EXPLICITLY end it, or when it times out
naturally, and that's when the Session_OnEnd will fire

Same with Application_OnEnd, which will fire when the very last connected
Session is explicitly ended or times out naturally...
Nov 18 '05 #3

P: n/a
The Session_End event should fire, but not when the user drops the browser.
It happens when the session times out, which is generally 10 to 20 minutes
later. Also Session_End is supported only in InProc mode.

--
Saravana
http://dotnetjunkies.com/WebLog/saravana/
www.ExtremeExperts.com
"Raghu Raman" <ra************@rediffmail.com> wrote in message
news:#8**************@TK2MSFTNGP10.phx.gbl...

HI,

am using a simple project in asp.net using c#.

if i put the break point in the application start & session start event
, they are firing good .BUT WHEN i close my project while running on IE,
the session end & application end event are not firing even though i put
the break point there.

Could u give me the solution for this how i could trace those.

With Regards
Raghu
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 18 '05 #4

P: n/a

Hi,

My hearty thanks to all of u people.

.Ya i got it clear with the session _end event and it works nice.

But , If i close the browser also, i need to log_off the user or it may
be enough to call the session_end event.

**

Now, could you please tell me how can i identify when the user closes
the application.Because i am doing the database updations about the
status(y/n ;y->Logged in;N->logged out )of the user in the session_end
event.

I need to call this event , even the user closes his browser.

For example if we close the yahoo,rediff,etc browser after having seen
our mails, it is assumed that the user has quit from yahoo,rediff etc.
So the user no longer is allowed to enter into the web .He has to give
his user id & password agin .
Hearty Thanks

Raghu


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #5

P: n/a

"Raghu Raman" <ra************@rediffmail.com> wrote in message
news:ul*************@TK2MSFTNGP10.phx.gbl...

Hi,

My hearty thanks to all of u people.

Ya i got it clear with the session _end event and it works nice.

But , If i close the browser also, i need to log_off the user or it may
be enough to call the session_end event.

**

Now, could you please tell me how can i identify when the user closes
the application.Because i am doing the database updations about the
status(y/n ;y->Logged in;N->logged out )of the user in the session_end
event.

I need to call this event , even the user closes his browser.

For example if we close the yahoo,rediff,etc browser after having seen
our mails, it is assumed that the user has quit from yahoo,rediff etc.
So the user no longer is allowed to enter into the web .He has to give
his user id & password agin .


Looks like they use memory-only cookies. And they expire automatically "when
you close the browser". In fact, system doesn't know anything about your
state until you try to access any page again and your browser send no
cookies. This way system decides that your session has been expired.

Dmitry
Nov 18 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.