ASP.NET如何注销用户的所有会话时,密码重置/更改 [英] ASP.NET how to logout user all session when password is reset/change

查看:134
本文介绍了ASP.NET如何注销用户的所有会话时,密码重置/更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

作为管理员,我可以为所有用户重置密码。我想知道我怎么能注销特定用户所有会话在所有设备/ PC时,我重置了密码?

As an Admin, I am able to reset password for all users. May I know how can I logout the particular users "all" sessions across all devices/PC when I reset his password?

例如:

1)用户1登录到PC1,PC2和PC3。

1) User1 logged in to PC1, PC2 and PC3.

2)管理员重置/更改密码的用户1。

2) Admin reset/change password for User1.

3)在PC1,PC2和PC3系统注销会话。

3) System logout session in PC1, PC2 and PC3.

如何能在这ASP.NET做?

How can it be done in ASP.NET?

感谢。

推荐答案

这是可能的,的Facebook 正在做,但它不是简单的

It is possible , Facebook,G mail are done that , But it is not simple

在检查用户对在session_start 如果标志设置了无效的会议数据库中使用的标志。可不必使用一个布尔值,你可以使用DateTime值和无效之前,这个时候,开始的所有会话。这可以通过检查在登录存储在饼干的值来完成。
检查以下计算器的讨论,我认为它会帮助你
<一href=\"http://stackoverflow.com/questions/12379215/how-to-force-logout-user-when-his-her-username-is-changed-by-another-user\">Check

Use a flag in the database that checks users on Session_Start that invalidates their session if that flag is set. May not necessarily use a boolean, you can use a DateTime value and invalidate all sessions that started prior to that time. This could be done by checking a value stored in a cookie upon login. check the below stackoverflow discussions i think it will help you Check

这篇关于ASP.NET如何注销用户的所有会话时,密码重置/更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆