Application on end & session not firing

R

Raghu Raman

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
 
A

Ariel Popovsky

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!
 
M

Mark Rae

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...
 
S

Saravana

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.
 
R

Raghu Raman

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
 
D

Dmitry Duginov

Raghu Raman said:
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
 

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,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top