Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
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 25-Jan-12 0:08am

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  
Comments
ernieball_26 at 25-Jan-12 5:37am
   
Do you mean the user should only use one PC/workstation everytime he/she logs-in?
Supriya Srivastav at 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 at 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)

  Print Answers RSS
0 DamithSL 445
1 Maciej Los 278
2 OriginalGriff 229
3 Zoltán Zörgő 190
4 BillWoodruff 160
0 OriginalGriff 7,934
1 DamithSL 6,084
2 Sergey Alexandrovich Kryukov 5,449
3 Maciej Los 5,174
4 Kornfeld Eliyahu Peter 4,539


Advertise | Privacy | Mobile
Web01 | 2.8.141223.1 | Last Updated 25 Jan 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100