session_end is not executing.

Posted by Abhi_patil under ASP.NET on 4/11/2009 | Views : 2143 | Status : [Member] | Replies : 1
i hav witten session_End() in global.asax page ..
but in my project there is one task which excutes after every minute..because of that the session_end event is not raising.
so i want to do manually end user session by session.abandon().

but how can i get that is user session has really ended.
i want session time out of 20 min.
can i check users last request time and from that i can get session time out.


Posted by: Majith on: 4/13/2009 [Member] Starter


For session timeout you have to maintain the timeout attribute in Web.config file:

<sessionState mode="InProc" sqlConnectionString="" cookieless="false" timeout="20"/>

No need to mention in Session_End() Event but you have to specify the
Session Timeout in Session Start Event for creating new session

 void Session_Start(object sender, EventArgs e)

Session.Timeout = 20;

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

Login to post response