I have a problem with my ASP.Net MVC application. I have the following in my web.config:
<authentication mode="Forms">
<forms loginUrl="~/Login" timeout="525600" />
</authentication>
<sessionState mode="InProc" timeout="525600" />
<machineKey validationKey="" decryptionKey="" validation="SHA1" decryption="AES" />
And this in my Global.asax
public void Session_OnStart()
{
Session.Timeout = 525600;
}
Still some times it works fine but sometimes the session runs out after just 3 - 5 minutes. What am I missing. Is there anything I can do to make session last longer. Thank you
UPDATE
Some of you suspected that the problem was recycle time but on my production server I don't have the rights necessary to change recycle time to test that. In the end I fixed it by manually saving session data in database and then when web session expires get data needed from database and put them back in web session.
Thank you for all of your help.