【发布时间】:2009-12-06 12:09:40
【问题描述】:
我需要将 memebership 超时设置为小于会话超时以避免使用成员资格并且登录会话已过期,这是我在使用登录控制的 asp.net 应用程序中以及当用户发送评论并且登录控制会话已过期它不应该接受评论,后来我知道我必须在登录控制会话过期之前使会员超时过期。
那么我怎样才能使会员超时到期 b4 会话到期??
提前致谢
【问题讨论】:
标签: asp.net-membership session-state
我需要将 memebership 超时设置为小于会话超时以避免使用成员资格并且登录会话已过期,这是我在使用登录控制的 asp.net 应用程序中以及当用户发送评论并且登录控制会话已过期它不应该接受评论,后来我知道我必须在登录控制会话过期之前使会员超时过期。
那么我怎样才能使会员超时到期 b4 会话到期??
提前致谢
【问题讨论】:
标签: asp.net-membership session-state
您可以设置会话和身份验证 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>
【讨论】: