问题描述
今天早上我和我的同事继续讨论有关存储身份验证cookie时了rememberMe =假的。
This morning me and my co-worker went on discussion about storing auth cookie whenRememberMe = false.
MVC4,表格Authentocation,C#.NET,Visual Studio的2012,IIS 7.5,进程内会话
MVC4 , Forms Authentocation, C#.Net, Visual Studio 2012, IIS 7.5 , InProcess Session
-
用户LogsIn,(了rememberMe = FALSE),并导航到该app.Default会话超时的项目设为30分钟,
User LogsIn,(RememberMe = false) and Navigates to an item in the app.Default session timeOut was set 30 mins,
用户复制的URL,并关闭了浏览器(IE9)
User Copied the URL and Closed the browser(IE9)
打开新的浏览器(IE9),并粘贴复制的URL,用户界面重定向到loginPage。
Opened new browser(IE9) and Pasted the Copied URL, UI redirected to loginPage.
下面我说,在步骤1中创建的会话仍然是有效的。,在关闭浏览器,浏览器失去了AuthCookie。
Here I say session created in step 1 is still valid., On close of the browser , browser lost the AuthCookie.
他说,该会议是基于浏览器会话也创造。我有点糊涂了。
He says that that Session is created based on browser session also. I'm bit confused.
请让我知道到底发生了什么。
Please let me know what actually happened.
对不起,我的英语很差
推荐答案
了rememberMe = false意味着发到用户的身份验证cookie是不是持久的(cookie的有效期设置为会话)。即,当在浏览器会话结束该cookie丢失。了rememberMe = true表示创建一个持久的cookie,并保存在多个浏览器会话(cookie的有效期设置为一个特定的日期,通常配置在web.config中)。
RememberMe = false means the authentication cookie that was issued to the user was NOT persistent (the expiration of the cookie is set to "SESSION"). That is, the cookie is lost when the browser session ends. RememberMe = true means a persistent cookie is created and is saved across multiple browser sessions(the expiration of the cookie is set to a specific date, usually configured in web.config).
这里阅读文档
这篇关于窗体身份验证的浏览器退出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!