Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Session Timeout Limit in ASP.NET?

I'm amending a Session time out in the Web.Config for an ASP.NET application written in C# and currently I have the timeout set to 120 minutes as shown below:

<sessionState mode="InProc" cookieName="Application_SessionId" timeout="120"/>

Is there a limit to this value? So if for example I wished to set it to 24 hours (1440 minutes) would this be applied?

It's ASP.NET version 4.0 with MVC 2.0

like image 653
Web Develop Wolf Avatar asked Jul 18 '13 09:07

Web Develop Wolf


1 Answers

by default the value is 20 and the maximum value is 525600 (525600 minutes equivalent to one year). Maintain below code in your Web.config file to maintain maximum session timeout:

<system.web>
    <sessionState mode="InProc" timeout="525600"></sessionState>
    ...
</system.web>

Above one worked for me. Please refer here

like image 120
Nani Avatar answered Oct 17 '22 09:10

Nani