【问题标题】:How can I extend the Forms Authentication time in ASP.Net?如何在 ASP.Net 中延长表单身份验证时间?
【发布时间】:2017-03-30 16:09:08
【问题描述】:

当我在我的 ASP.Net 网站上发布内容时,
如果等待 7 分 10 秒,页面上的会话将变为空。

我在 Global.asax 的 onSessionStart 方法上有这个

Session.Timeout= 60;

并且在 web.config 中有此代码,但其中任何一个都不起作用:

<system.web>
  <authentication mode="None">
    <forms timeout="30" slidingExpiration="true" />
  </authentication>

我该如何解决这个问题?

【问题讨论】:

    标签: c# asp.net session authentication timeout


    【解决方案1】:

    您确定身份验证有效吗,因为它设置为无。

    它应该设置为表单。即

    <authentication mode="Forms">
    

    【讨论】:

    • 嗯好的,但我将其设置为无,因为我不使用会员资格
    【解决方案2】:

    我发现这是属于服务器的会话空闲时间。
    我已在应用程序池中对其进行了更改。

    要做到这一点:
    控制面板/
    管理工具/
    Internet 信息服务 (IIS) 管理器/
    左侧:应用程序池
    右键单击并选择高级设置/
    IIS 超时...

    【讨论】:

      猜你喜欢
      • 2014-04-01
      • 1970-01-01
      • 1970-01-01
      • 2017-09-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多