How to Set Session Timeout in Web.Config

How to set session timeout in web.config

If you want to set the timeout to 20 minutes, use something like this:

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

How can I set infinity session time out in asp.net project

You can set session timeout in web.config as shown below. The value is showing minutes, so you can set as long as you want, up until a year.

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

The Timeout property can be set in the Web.config file for an
application using the timeout attribute of the sessionState
configuration element, or you can set the Timeout property value
directly using application code.

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



Related Topics



Leave a reply



Submit