Click here to Skip to main content
11,701,904 members (47,043 online)
Rate this: bad
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 24-Jan-12 23:08pm

1 solution

Rate this: bad
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.
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:

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 Maciej Los 380
1 OriginalGriff 314
2 Sergey Alexandrovich Kryukov 310
3 Mika Wendelius 119
4 CHill60 105
0 OriginalGriff 8,324
1 Sergey Alexandrovich Kryukov 7,422
2 CPallini 4,912
3 Maciej Los 4,196
4 Mika Wendelius 3,556

Advertise | Privacy | Mobile
Web04 | 2.8.150819.1 | Last Updated 25 Jan 2012
Copyright © CodeProject, 1999-2015
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