Last post Sep 14, 2011 04:54 PM by markfitzme
Sep 13, 2011 04:22 AM|smilu.net|LINK
I have an application Im using Session to store the Login and Logout info...
but my Seesion_End event is not getting raised.
If I stop the server at that time it will end all the sessions i started..
I set the Sesssionstate as InProc in Web.Config tooo..
But still its not working when i close the browser..
When I close the browser how can i call it?? or am i missing any thing?
Sep 13, 2011 04:38 AM|harsh.cer|LINK
Following link will help you
Sep 13, 2011 04:56 AM|jeet.patel|LINK
If you want to remove session on application lavel than use Session.Abandon() and if you want to remove single or particular session id than use
put Session.Abandon() or Session.Remove("XYZ") logout click event.
Sep 14, 2011 03:01 PM|konanki|LINK
example for session_end
killng session u have to use session.abandon();session.clear();
Sep 14, 2011 03:28 PM|hans_v|LINK
But still its not working when i close the browser
It is not supposed to! The session end automatically after the amount of minutes (default 20) of inacticity set in the TimeOut property
Sep 14, 2011 04:54 PM|markfitzme|LINK
It's not going to get called when you close the browser. How does the server know you closed the browser? Your browser isn't conneted directly to the server during the entire time. It is only connected while it is getting the html, images, css, etc.. Once
it's done the connection is closed. That's why you have a Session object, because the web is stateless and the clients are not connected in a true session. The session will continue regardless of your browser until IIS determines that the session has reached
the timeout, the application hasn't been used during a certain period of time, or the application pool crashes or is recycled.