问题
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?
Example:
1) User1 logged in to PC1, PC2 and PC3.
2) Admin reset/change password for User1.
3) System logout session in PC1, PC2 and PC3.
How can it be done in ASP.NET?
Thanks.
回答1:
It is possible , Facebook
,G mail
are done that , But it is not simple
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
来源:https://stackoverflow.com/questions/27287875/asp-net-how-to-logout-user-all-session-when-password-is-reset-change