Reputation: 875
I have the following config in an attempt to allow the session to be retained for around 239 minutes, however the session is lost in less than an hour.
<system.web>
<sessionState mode="InProc" timeout="240" />
<compilation debug="true" targetFramework="4.0">
<assemblies>
...
</assemblies>
</compilation>
<authentication mode="Forms">
<forms loginUrl="~/Account/LogOn" timeout="239" />
</authentication>
<pages>
<namespaces>
...
</namespaces>
</pages>
I don't believe there to be any C# code overriding these settings.
Does anyone know why this might be happening?
Upvotes: 2
Views: 829
Reputation: 1330
The way that session timeouts and forms authentication timeouts work completely different.
Upvotes: 0
Reputation: 2335
you also have an idle time-out setting on the application pool process which is set to 20 minutes by default, e.g. every 20 minutes (if no activity) the app pool is reset which also would throw away any active in-proc sessions.
Upvotes: 3