您好,我们使用的是FormsAuthentication.SetAuthCookie(profile.Id, false);
现在的问题是这个cookie什么时候过期?
当然,一旦我关闭了所有浏览器,它就会过期,但它不会,我会让浏览器保持打开状态,而且我不知道timelimit。
发布于 2009-10-27 20:26:33
它将依赖于web.config中的Timeout属性。
发布于 2016-05-24 05:31:12
在web.config文件的system.web属性中,必须设置以下内容:
<authentication mode="Forms">
<forms loginUrl="~/Account/Login" timeout="2880" />
</authentication>然后,您的cookie将根据您在timeout属性中设置的值而过期。
https://stackoverflow.com/questions/1630441
复制相似问题