【问题标题】:ASP.NET/MVC5 <sessionState> timeout configuration being ignoredASP.NET/MVC5 <sessionState> 超时配置被忽略
【发布时间】:2016-08-26 20:37:06
【问题描述】:

我一直在尝试将我的 Web 应用程序会话超时设置为 90 分钟,但没有成功。

在我的 web.config 中,我将其设置如下:

  <system.web>
    <authentication mode="None" />
    <compilation debug="true" targetFramework="4.5" />
    <httpRuntime targetFramework="4.5" />
    <sessionState mode="InProc" timeout="90"></sessionState>
  </system.web>

...但会话在 20 分钟时一直超时(默认值)。

关于如何追踪这个问题的任何见解?

【问题讨论】:

    标签: asp.net-mvc web-config session-state session-timeout


    【解决方案1】:

    工作进程的默认空闲超时也是 20 分钟。由于您使用的是 InProc,因此很可能是这个计时器导致了超时。切换到 ProcServer 或 SqlServer 或者最好还是退出使用 ASP.Net 会话。

    【讨论】:

      猜你喜欢
      • 2014-07-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-09-13
      • 1970-01-01
      • 1970-01-01
      • 2023-03-18
      • 1970-01-01
      相关资源
      最近更新 更多