Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#
Hi,
 
I create a windows form log in, I've finished the design. I want to use the windows authentication like logging on my pc. I don't know how to start the code.
 
Appreciate you response and thanks in advance.
Posted 28-Nov-12 7:00am
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

You have provided almost no details here so I'll have to give you an answer with almost no details.
 
I suggest you start with the authentication mechanism you need and understanding how it works. For example, if you are writing a web app, you should look at federated identity and/or OAuth. If you need to authenticate against linux or something like that, you should investigate Kerberos. If you are authenticating against Active Directory then you should look into that and LDAP.
 
Further, you should probably consider the security requirements of your app. If you are writing an app in C# to run on a user's desktop, you should know that the app will run as that user and automatically inherit their active directory security token... in other words, your app will already be "logged in" as that user... inheriting all of the rights that user has. So would it really be a requirement to log them in as themselves? If the app needs run under a different user account or needs to run with elevated permissions, there are lots of guides online for doing that. Windows has well-defined processes for both situations that will handle things for you, again causing your app to automatically inherit the assigned rights.
 
You probably should have understood the problem and the requirements before you did your form design. Chrome-first is a poor development approach when you haven't defined how your application will actually work. Don't re-invent the wheel. Define your problem and requirements sufficiently to understand that a wheel is what you want then go about figuring out how to use it.
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 5,130
1 DamithSL 4,237
2 Maciej Los 3,700
3 Kornfeld Eliyahu Peter 3,470
4 Sergey Alexandrovich Kryukov 2,846


Advertise | Privacy | Mobile
Web02 | 2.8.141216.1 | Last Updated 28 Nov 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