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

7 Years
Discussion Span
Last Post by Dragonbaki

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

    <sessionState timeout="200"></sessionState>

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:


Edited by __avd: n/a


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

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.