ASP.NET ajax认证服务问题
尽管我已将 isPercient
设置为 false,但授权 cookie 在会话之间仍会保留。这只发生在 IE8 上。对于其他浏览器,它可以按预期工作。
Sys.Services.AuthenticationService.login(username, pw, false, null, null, null, null, "User Context")
Although I've set isPersistent
to false, the authorization cookie is persisted between sessions. This only happens with IE8. With other browsers it works as supposed.
Sys.Services.AuthenticationService.login(username, pw, false, null, null, null, null, "User Context")
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是因为 IE8 对会话的处理方式有所不同。
例如,如果您同时打开 2 个 IE8 窗口并访问网站,以用户 A 身份登录,然后在另一个窗口中访问同一网站,它将共享您的会话。然后,如果您注销并在另一个窗口中以用户 B 身份登录,然后返回到第一个窗口并刷新,您也将在那里以用户 B 身份登录。
您无法通过代码强制浏览器 (IE8) 表现不同,但是您可以通过打开一个新窗口然后转到
文件 - 新会话
来强制 IE8 打开新会话。或者,您可以使用以下命令从命令行启动 IE8:有关 IE8 新进程模型的更多信息,请参阅 这篇文章
This is because IE8 treats sessions differently.
For instance, if you open 2 IE8 windows at the same time and go to web site, login as user A, then visit the same site in the other window, it will have shared your session. Then if you logout and the login as user B in the other window, then go back to first window and refresh, you will be logged in as user B there too.
You can't force the browser (IE8) to behave differently by code, you can, however force IE8 to open up with a new session by opening up a new window then go to
File - New Session
. Alternatively, you could start IE8 from the command line using:for more information on the new Process model of IE8, see this article