如何防止用户登录两次? [英] how to prevent users to login twice ?
问题描述
你好;
我已经在我的部门用asp.net 4.0进行了在线互联网调查。
这种形式没有用户的登录页面,所以我面临的首要问题是同一用户的登录。
如何防止相同的用户在调查中做出两次贡献?
注意:我在一家所有PC都在网络中连接的机构工作。
是那有什么解决方案吗?
hello;
I have made an online internet survey in my departement with asp.net 4.0.
in this form there is no login page for users, so the first problem my i face to is the loging of same users.
how can i prevent the same users to be able contribute in the survey twice?
Note: iam working in an institute that all PC are connected in network.
is there any solution for that?
推荐答案
你可以做的是保留一个Active Directory用户列表
已填写表格,每次用户填写表格或访问页面(您决定),您可以根据您持有的列表进行验证,并相应地允许/拒绝操作。
要获得用户的身份,您可以尝试:
What you can do is keep a list ofActive Directory Users
that has already filled the form and every time a user fills the form or access the page (you decide) you can validate against the list you are holding, and allow/deny actions accordingly.
To get the user's identity, you can try:
Request.LogonUserIdentity.User
查看有关LogonUserIdentity的更多信息: system.web.httprequest.logonuseridentity.aspx [ ^ ]
祝你好运,
江户
See more on LogonUserIdentity: system.web.httprequest.logonuseridentity.aspx[^]
Good luck,
Edo
我认为会话是一个很好的选择。参见..
http://stackoverflow.com/questions/4279262/什么是最简单的方法 - 阻止用户登录到网络应用程序 - 两次 [ ^ ]
如何限制用户在asp.net中登录两次 [ ^ ]
http://dotnet.learningtree.com/2011/07/11/preventing-duplicate-logins-in-asp-net/ [ ^ ]
http://www.dotnetfunda.com/articles/article1083-restricting-user-to-login-multiple-times-using-same-credentials.aspx [ ^ ]
I think Session is a good option to do that.See..
http://stackoverflow.com/questions/4279262/what-is-the-simplest-way-to-block-users-to-log-on-to-a-webapplication-twice[^]
how to restrict user login twice in asp.net[^]
http://dotnet.learningtree.com/2011/07/11/preventing-duplicate-logins-in-asp-net/[^]
http://www.dotnetfunda.com/articles/article1083-restricting-user-to-login-multiple-times-using-same-credentials.aspx[^]
这篇关于如何防止用户登录两次?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!