Why really short timeout in ASP.NET MVC?
Found the answer finally after a lot of Googling...
You have to set a custom machinekey in the web.config file. I used this generator:
http://aspnetresources.com/tools/machineKey
This seems to have to do something with "recycling" on the web host, which causes the user to be logged off, if I understood it correctly.
Anyway, it works fine now!
2880 is given in minutes. It will logout automatically if you add slidingExpiration="true"
. See example below.
<forms loginUrl="~/Account/LogOn" timeout="2880" slidingExpiration="true"/>