Click here to Skip to main content
13,450,154 members (52,294 online)
Rate this:
Please Sign up or sign in to vote.
See more:

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

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-2016 | 2.8.180318.3 | Last Updated 28 Nov 2012
Copyright © CodeProject, 1999-2018
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