1

Possible Duplicate:
Session timeout in ASP.NET

I am working is ASP.NET and using Session transfer method for page locking. In my case the session is being expired very soon than that of my requirement. Is there any way to increase session expiry time that default time?

Community
  • 1
  • 1

3 Answers3

1

web.config

<system.web>
    <sessionState timeout="540"/> 
</system.web>

That what you're after?

More information on MSDN.

Reed Copsey
  • 554,122
  • 78
  • 1,158
  • 1,373
Brad Christie
  • 100,477
  • 16
  • 156
  • 200
1

use Session.Timeout property to set timeout limit of your choice

love Computer science
  • 1,824
  • 4
  • 20
  • 39
0

Use this code in your web.config and set timeout to whatever you want to. The default timeout is 20 mins.

<configuration>
  <system.web>
     <sessionState 
         timeout="100" 
     />
  </system.web>
</configuration>

From your code behind you can use following

Session.TimeOut=100;
Wicked Coder
  • 1,128
  • 6
  • 8