Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在asp.net中允许每个帐户只允许两个会话登录,防止三个用户尝试访问;不再有两个用户
1)您可以通过使用 Application 对象在您的 global.asax 中跟踪登录的用户。
2)在 Session_Start 方法或者你的 login 方法中,你可以检查用户是否存储在 Application 对象中。
3)在 Session_End 方法或注销方法中,您需要从 Application 对象中删除用户。