Last post Feb 02, 2011 11:28 AM by sachingusain
Feb 02, 2011 09:48 AM|Vinaybhiraskar|LINK
hi, i want to know how expire the session after certain period of time which has been created once the customer logged in to the page
Feb 02, 2011 11:01 AM|Durga89|LINK
i want to know how expire the session after certain period of time
ASP.Net provides a very effective StateManagement. Session State is actually created for millions of users.
Let's check the case of one user:
1. When User log in to a site through a browser, a session for that user begins.
2. Every session is identified by a Unique Session ID , which is given by the Server.
3. Every Interaction the user make through the web browser is identified through this session ID.
4. Session Expires while following :
1) When The User logs out, the session expires. We have coded like
2) When the user closes the browser, the Session expires.
3) When the user doesn't make a response in 20 minutes after he logged in, the session automatically times out. This is because the default session timeout period is 20 minutes.
4) When User accesses the same site through different browsers at the same time, session can cause some problem. It depends upon the browsers' behaviour.
These are how a session expires.
Hope it helped you,
Mark as answer if it helped you.
Thanks & regards,
Feb 02, 2011 11:12 AM|Waqar_ali|LINK
Web.config file contains entry of sesstion state which define a property of timeout, this property contains munber of minuts. Suppose if you have set this property to 30. If user open some page and didnt perform any action within 30 minuts then this server
expires session of this user.
This entry will set session time for your website in IIS.
For session state please see following link.
Feb 02, 2011 11:28 AM|sachingusain|LINK
You can configure timeout within web.config file like this:
timeout="number of minutes"
sqlConnectionString="sql connection string"
stateNetworkTimeout="number of seconds"/>
Or, you can explicitly call "Session.Abandon" method in your "LogOut" event handler.