Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/asp.net-mvc-3/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 会话在MVC中过期_C#_Asp.net Mvc 3_Asp.net Mvc 4 - Fatal编程技术网

C# 会话在MVC中过期

C# 会话在MVC中过期,c#,asp.net-mvc-3,asp.net-mvc-4,C#,Asp.net Mvc 3,Asp.net Mvc 4,我面临一个问题, 我已在web.config中设置了会话超时 <system.web> <sessionState timeout="60" mode="InProc" /> <httpRuntime targetFramework="4.5" /> <compilation debug="true" targetFramework="4.5" /> <authentication mode="Forms"> <forms log

我面临一个问题, 我已在web.config中设置了会话超时

<system.web>
<sessionState timeout="60" mode="InProc" />
<httpRuntime targetFramework="4.5" />
<compilation debug="true" targetFramework="4.5" />
<authentication mode="Forms">
<forms loginUrl="~/Account/Login" timeout="2880" />
</authentication>
</system.web>

你从来没有问过问题,所以我想试着猜一下你在问什么

<sessionState timeout="60" mode="InProc" />

mode=“InProc”
时,设置
timeout=“60”
通常不会将会话超时延长超过20分钟,因为应用程序池将在20分钟后(默认情况下)降速

没有应用程序池=没有进程=没有会话

更改应用程序池设置或使用其他会话状态提供程序。

我遇到了一个问题,请找到解决方案。
<sessionState timeout="60" mode="InProc" />