Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.NET MVC FormsAuthentication Cookie timeout cannot be increased

Using the default ASP.NET MVC template, I cannot figure out how to increase the FormsAuthentication timeout. It seems to always use 30 minutes.

I have followed Scott Gu's recommendation from this blog post, but it does not seem to make a difference. Does anyone have a suggestion?

His suggestion was to set the timeout value in the web.config file:

<system.web>
    <authentication mode="Forms">
          <forms timeout="2880"/>
    </authentication>
</system.web>
like image 298
YeahStu Avatar asked Nov 02 '09 21:11

YeahStu


1 Answers

My issue was only occurring in my production environment at my web host.

I found this link and generated a machine key to put in the web.config. Once I did that, the timeout value took effect.

like image 66
YeahStu Avatar answered Oct 17 '22 10:10

YeahStu