ASP.NET会员preventing民在不同的机器相同的用户登录,同时用户登录、机器、不同、会员

2023-09-04 05:24:44 作者:∞ 落魄的灵魂

一对我的基于网络的系统的安全要求是prevent人登录时在同一时间在不同的机器相同的用户。

One of the security requirements for my web based system is to prevent people logging in as the same user on different machines at the same time.

例如。保证人们在使用相同的密码/共享密码不能所有的日志。

E.g. to ensure that people cant all log in using the same password/share passwords.

有没有一种方法使用ASP.NET成员资格提供程序来实现这一目标。我将需要手动保存每个会话信息,如果是这是可靠的?

Is there a way to achieve this using the ASP.NET membership provider. Will I need to manually store info on each session and if so is this reliable?

推荐答案

检查System.Web.Security.MembershipUser.IsOnline当用户正在登录。

Check System.Web.Security.MembershipUser.IsOnline when the users is logging in.