Click here to Skip to main content
11,718,589 members (77,470 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: SQL-server-2005 C#2.0 C#3.0 C# , +
i am creating desktop application program to check username and password in lan network , and the username and passwords are stored in a different computer.

i thought of doing in two ways like .
1) i will running a server program where the database of username and password are stored ,so if a client sends the username and password to server and the server recieves them and checks normally .

2) this method is new to me ,when client wants to login with username and password,
he has to connect direct to lan sql database and checks for authentication .

my problem is which would be better .
if you think 2nd one is better how can i implement that .

Posted 2-Dec-11 18:45pm
Edited 5-Jan-12 7:29am

1 solution

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

Solution 1

The second method is preferable.

If you choose the first method you have to encrypt their passwords and also use integrated authentication for preventing embedding of passwords in your EXE file resources.

But if you choose the second method you can manage user access to the resources of DB from SSMS.
For implementing the second methods you can build your connection string by the given username and password dynamically and try to connect to the server in a try catch block. If you got an exception then the given username and password was not correct (if the other conditions were well).

Hope it helps.

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 651
1 OriginalGriff 210
2 F-ES Sitecore 185
3 Jochen Arndt 160
4 Maciej Los 130
0 OriginalGriff 535
1 Maciej Los 529
2 Richard MacCutchan 440
3 CHill60 415
4 F-ES Sitecore 415

Advertise | Privacy | Mobile
Web02 | 2.8.150901.1 | Last Updated 5 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