Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Good day CodeProject fella's

I am here again with another question, I am thinking of how to handle log-in in a WinForms application. For example I have a log-in form which requires the user to input the username and password that is stored in a database (I have done this part).

Now here's the thing, when I tried to log-in using the same account on two different PC's or workstation, both computers can access with the same account. Is there a way on how I can prevent this thing? Are there such log-in controls when it comes to WinForms applications?

Please do help me guys, thanks a lot!
Posted

1 solution

You can maintain login detail in database to keep track of user's login by maintaing IP of client,and on relogin match it and deal accordingly.
 
Share this answer
 
Comments
ernieball_26 25-Jan-12 5:37am    
Do you mean the user should only use one PC/workstation everytime he/she logs-in?
Supriya Srivastav 25-Jan-12 5:45am    
No,if the same credentials are used to login,previous loging session should be out,for this you can store some instance id for a user and on relogin increment it.
ernieball_26 26-Jan-12 0:59am    
Is it similar to ASP.NET's Membership provider? Sort of a session state?
I found this on the web:
http://devpinoy.org/blogs/comgen/archive/2007/08/15/use-membership-api-in-winforms.aspx

I understand the code but I am really not sure of its functionality, Can any one give a detailed explanation on how it serves its purpose. Thanks!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900