【问题标题】:Unable to increase the Session Variable timeout in .Net Application?无法增加 .Net 应用程序中的会话变量超时?
【发布时间】:2017-06-17 13:27:27
【问题描述】:

我的应用程序严重依赖会话变量。我通过会话传递了很多 id,例如Session["RecordId"] = myID。问题是会话会在几分钟内到期,即使我已经增加了会话变量的超时时间。我已尝试延长会话到期时间:

<sessionState mode="StateServer" cookieless="false" timeout="120"/>

我还尝试使用IISGlobal.asax 文件增加超时。还有其他方法还是我做错了什么?

【问题讨论】:

    标签: .net session-timeout


    【解决方案1】:

    如果真的需要模式是 StateServer where StateConnectionString

     <sessionState mode="StateServer"
      stateConnectionString="tcpip=SampleStateServer:42424"
      cookieless="false"
      timeout="20"/>
    

    否则你可以使用默认模式值 InProc

    <sessionState mode="InProc" cookieless="false" timeout="120"/>
    

    【讨论】:

      猜你喜欢
      • 2011-06-04
      • 1970-01-01
      • 2015-09-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-01-29
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多