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..?

    <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.

      timeout="30" />

You can override this setting programatically:


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..