IIS7 ASP.NET 进程内会话在应用程序回收后不会丢失
我有一个在 IIS7 下运行的 ASP.NET MVC 应用程序。它使用默认的进程内会话管理,根据我读到的所有内容,在应用程序池回收后应该会丢失用户的会话。 但似乎并没有失去它。即使 IIS 重置也不会丢失会话。 IIS7 中是否发生了一些使会话保持活动状态的更改?
I've got an ASP.NET MVC app running under IIS7. It's using the default in-proc session management, which, according to all that I read, should lose the users' session after an app pool recycle.
It doesn't seem to be losing it though. Even an IIS reset doesn't lose the session.
Has something changed in IIS7 that keeps the session alive?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是由于 cookie 重播 - 发生的情况是您的浏览器发送带有旧身份验证票证的 cookie,该 cookie 被接受为新会话,因为 Web 服务器不存储有效和过期的身份验证票证以供以后比较。如果恶意用户获得有效的表单身份验证 cookie,这会使您的网站容易受到重放攻击。要提高使用表单身份验证 cookie 时的安全性,请参阅下面的 MSDN 链接:
http://msdn.microsoft.com/en-us/library/system.web.security.formsauthentication.signout.aspx
This is due to cookie replay - what happens is that your browser sends the cookie with old authentication ticket which is accepted as a new session as the Web server does not store valid and expired authentication tickets for later comparison. This makes your site vulnerable to a replay attack if a malicious user obtains a valid forms authentication cookie. To improve security when using a forms authentication cookie see MSDN link below:
http://msdn.microsoft.com/en-us/library/system.web.security.formsauthentication.signout.aspx