Click here to Skip to main content
13,299,727 members (59,809 online)
Rate this:
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
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 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:

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
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web02 | 2.8.171207.1 | Last Updated 25 Jan 2012
Copyright © CodeProject, 1999-2017
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