【问题标题】:membership timeout and session timeout成员超时和会话超时
【发布时间】:2009-12-06 12:09:40
【问题描述】:

我需要将 memebership 超时设置为小于会话超时以避免使用成员资格并且登录会话已过期,这是我在使用登录控制的 asp.net 应用程序中以及当用户发送评论并且登录控制会话已过期它不应该接受评论,后来我知道我必须在登录控制会话过期之前使会员超时过期。

那么我怎样才能使会员超时到期 b4 会话到期??

提前致谢

【问题讨论】:

    标签: asp.net-membership session-state


    【解决方案1】:

    您可以设置会话和身份验证 cookie 的超时时间:

    <authentication mode="Forms">
      <forms
        loginUrl="/login.aspx"
        requireSSL="true"
        protection="All"
        timeout="15"
        domain="example.com"
        slidingExpiration="true"
        name="auth_cookie" />
    </authentication>
    

    和会议:

    <system.web>
        <sessionState 
          mode="InProc"
          cookieless="false"
          timeout="20" />
    </system.web>
    

    【讨论】:

    • 嗨,我想知道为什么在 中您将超时设置为 15 而在 sessionstate 中设置为 20?
    猜你喜欢
    • 2011-04-24
    • 2018-01-28
    • 2015-10-10
    • 2010-12-05
    • 2010-12-25
    相关资源
    最近更新 更多