我有以下配置嘗試允許會話保留大約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