pls explain

Posted by P_ratnawat under ASP.NET on 9/1/2009 | Views : 1269 | Status : [Member] | Replies : 3
why session_end event not getting called in asp.net application when browser is closed?In am explicitly calling a session.end event by firing a script on browser close that calls a exit.aspx.this exit.aspx pages code behind calls session.end but then too session_end event of global.asax is not getting called




Responses

Posted by: Vuyiswamb on: 9/1/2009 [Member] [MVP] [Administrator] NotApplicable

Up
0
Down
Good Day P_ratnawat

I guess that Session end is fired when the session timeout expires.

So possibly it means that closing a browser means that a seesion has ended.

If u want to redirect to any page when the session is ended then

put the following code in the global.asax and please understand

that the event will be fired only when timeout happens.

Thank you for posting at Dotnetfunda


Vuyiswa Maseko

Thank you for posting at Dotnetfunda
[Administrator]

P_ratnawat, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: P_ratnawat on: 9/1/2009 [Member] Starter

Up
0
Down
do u mean that if i m calling session.abondon then too session will not expire.?On browser close I have written a script which redirects to some other page and the page calls session.abondon then too session_end is not getting called.

P_ratnawat, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vuyiswamb on: 9/1/2009 [Member] [MVP] [Administrator] NotApplicable

Up
0
Down
Good Day P_ratnawat

The session.abondon is called , my point is that the Session end in the global.asax is only fired when the session has timeout, now you need to continue to manage your sessions in your application and if you forgot to manage your session, the event Session end in the Global.asa will kick in and get fired to end that session.


Thank you for posting at dotnetfunda

Vuyiswa Maseko

Thank you for posting at Dotnetfunda
[Administrator]

P_ratnawat, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response