Click here to Skip to main content
16,005,169 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
how Can i Set Session Expire time?!
Posted

 
Share this answer
 
Yup....
It is possible by adding the below configuration in your Web.Config file.
<system.web>
    <sessionstate mode="InProc" timeout="1" />
</system.web>


here you can change the timeout value..
 
Share this answer
 
even you can simply set timeout at the default.aspx page load by writing

C#
//u can set timeout value as you wish however the time here is in miliseconds
Session.Timeout=30000


which renews session every time the default page loads
 
Share this answer
 
v2
Hi,

You can set the session timeout by various ways.

1. Using C#
2. Using jqyery
3. Using Ajax

Here are some links that can help you in finding the various ways.
session timeout using jquery
Sesion timeout using Ajax
Session timeout using C#
Some more links:
Session timeout on a asp.net with master pages
Session Timeout Warning in ASP.NET

Thanks
 
Share this answer
 
XML
<configuration>
  <system.web>
     <sessionState timeout="20"></sessionState>
  </system.web>
</configuration>
 
Share this answer
 
Default session time is 20 mins


change Web.Config to


XML
<configuration>
  <system.web>
    <sessionState mode="InProc" cookieless="true" timeout="30" />
  </system.web>
</configuration>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900