Increase session timeout to 1 hour in ASP.Net

Last Reply 27 days ago By dharmendr

Posted 27 days ago

i am write code to maintain session 1 hr but its not maintening 1 hr seesion

You are viewing reply posted by: dharmendr 27 days ago.
Posted 27 days ago

Hi akshay806,

You can increase the session timeout in the following ways.


Open your web.config file and under the system.web section add the following.

<sessionState timeout = "60" mode = "InProc" />

Default Session Timeout is 20 minutes. Replace 60 (minutes) with time you wish.

Global.asax file

Under the Session_Start method, set the timeout property of the session to the required value like this.

Session.Timeout = "60";


I agree, here is the link: