My session_onend is not working

  • Thread starter Thread starter Anand
  • Start date Start date
A

Anand

In my website i want to trace the event when user log off
from the site by closing the explorer so i am unable to
run any server side program at that time and my
session_onend event also not working can any one tell me
why the session_onend is not working.
Thanx in advance
 
Anand,

session_onend is not fired when the user closes his (or her) browser but
when the session expires on the server. The two have little relation. In
default behavior the session timeout is set to 20 minutes which means that a
session will be closed if no request have been made on it for 20 minutes.
Your session_onend will be called then.

You can alter the session timeout and set it to a shorter period. However be
aware that when you set it to for instance 5 mins and the user takes over 5
minutes to read some page and then tries to navigate to another page his
session will be expired. So a new session will be created for him, depending
on what you app does this may (requires a new login?) or may not be a real
problem for you.

Also note the following (from the session state helppage)
Note The Session_OnEnd event is supported only the in-process
session-state mode. This event is not raised if you use State Server or SQL
Server modes.
So this may also be an issue for you.

Hope this helps,
Edwin Kusters
Hot ITem Informatica
 
Back
Top