我有以下配置尝试允许会话保留大约239分钟,但会话在不到一个小时内丢失。MVC ASP.NET网站早于设置显示
<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>
我不相信那里是任何C#代码覆盖这些设置。
有谁知道为什么会发生这种情况?
当您使用是InProc会话上,很可能较早失去它。尝试将其移动到数据库。 – Aristos 2013-03-07 12:54:33