简体   繁体   English

如何在Windows窗体应用程序中维护唯一登录?

[英]How to maintain unique login in windows form application?

I am developing a winform application in which user's login is validated through ms sql server 2000 database.When user entry its user name and password, application checks its exists in user table or not. 我正在开发一个winform应用程序,其中通过ms sql server 2000数据库验证用户的登录名。当用户输入其用户名和密码时,应用程序检查其是否存在于用户表中。

Now my requirement is if a user already login through one system it should not log in through another system. 现在,我的要求是,如果用户已经通过一个系统登录,则不应通过另一个系统登录。

if solution like make entry in database about status of user like on successful log in mark user status is true and on closing application mark false , then in the case of network or hardware failure or system exception. 如果诸如在数据库中成功登录用户状态为true并在关闭应用程序标记为false时之类的关于使用户状态进入数据库的解决方案,则在网络或硬件出现故障或系统异常的情况下。

so, please suggest me a optimal solution . 所以,请给我建议一个最佳解决方案。

You should use timeout. 您应该使用超时。 the successful log in is stored in status table with datetime and detect whether user is idle for timeout duration then mark false. 成功登录将与日期时间一起存储在状态表中,并检测用户是否闲置超时时间,然后将其标记为false。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在Windows窗体应用程序中创建自动登录? - How to Create an Automatic login in windows form application? 如何在 Winforms 应用程序中维护用户登录详细信息? - How do I maintain user login details in a Winforms application? 在 c# windows 申请表中登录仪表板后如何获取用户名 - How I get the username after login in the dashboard in c# windows application form 如何为登录应用程序c#Windows Form保存许多用户名或密码 - How to save many username or password for login Application c# Windows Form 从Windows窗体应用程序(Web服务)登录到Sharepoint网站 - Login to Sharepoint site from Windows Form Application (Web Services) 在Windows Phone应用程序中使用sqlite登录表单,应用程序启动设置 - Login form with sqlite in windows phone application, app launch settings c#应用程序-每次用户登录windows useraccount时弹出一个表单 - c# application - popup a form everytime user login in windows useraccount Windows窗体:登录后创建主应用程序,哪个窗体运行? - Windows Forms: create the main application after login, which form to run? 如何使用Windows表单登录基于JavaScript的站点? - how to login a javascript based site with a windows form? 在我的 C# windows 窗体应用程序中检查 Gmail 登录凭据? - Checking Gmail login credentails in My C# windows form Application?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM