Reputation: 1953
I need to do windows authentication for a web interface asp.net.
I have set up config authentication mode equal to windows.
For windows authentication, we need to set up only this:
- <authentication mode="Windows" />
and in IIS we need to:
-remove anonymous access
-check integrated windows authentication.
Do we need to any other thing for windows authentication?
How to get username for validating in c#?
Thanks
Upvotes: 2
Views: 1545
Reputation: 38179
No, nothing else is required for windows authentication (assuming you only need authentication and not impersonation) in an asp.net application. You can now get the user's identity from
(WindowsIdentity)HttpContext.Current.User.Identity;
Upvotes: 4