Increase session timeout to 1 hour in ASP.Net

Last Reply 4 months ago By dharmendr

Posted 4 months ago

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

You are viewing reply posted by: dharmendr 4 months ago.
Posted 4 months 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: