Click here to Skip to main content
15,885,767 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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

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.
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900