Hi guys.. Can anybody tell me about how to increment default session timeout(20 mins) in dot net..? It's urgent.. Hope anybody will help me.. Thanks in advance...

I have given like this in web.config file.. But still it doesn't work..?

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

I used it as like this..

<authentication mode="Windows" />

Any particular reason you want to set the timeout to an arbitary value of 200 or do you just want the session variables to remain indefinately?

If its indefinately then check that the user has been authenticated and populate the session variables accordingly

Text from MSDN Page :

The Timeout property cannot be set to a value greater than 525,600 minutes (1 year). The default value is 20 minutes.

The following code example sets the timeout session attribute to 30 minutes in the Web.config file.

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

You can override this setting programatically:

Session.TimeOut=50;

If you manage IIS, the very simple to increasing time of session in there, all set time in code behide or webconfig are not change. Hope it help you

When i gave like this..

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

its working fine... Thanks..