确保只有一个使用ASP.Net成员资格提供用户登录 [英] Ensuring only one user login using ASP.Net Membership Provider

查看:125
本文介绍了确保只有一个使用ASP.Net成员资格提供用户登录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何确保只有一个用户在同一时间登录,每个帐户?

How would you ensure that only one user is logged in per account at a time?

假设饼干是持久性的。

推荐答案

通常情况下,最好的办法就是实施了检查最后一次登录的提供商定制,以及添加方法你code保持跟踪用户操作。

Typically the best way is to implement a customization on the provider that checks for last login, as well as adding methods to your code to keep track of user action.

的关键是,你必须知道在什么时候做了用户最后一次做某件事,或者注销。从那里,你可以决定是否该帐户实际上是准备好了。如果您设置了在code这些元素跟踪,然后可以修改成员资格提供检查,以确保该帐户可以登录。

The key is that you must know at what point did the user last do something OR logout. From there you can determine if the account is actually ready. If you setup the tracking for these elements in code, You can then modify the membership provider to check to ensure that the account can login.

这篇关于确保只有一个使用ASP.Net成员资格提供用户登录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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