Reputation: 1497
I have a serious problem authenticating my user against AD. I can use the PrincipalContext way or the DirectoryEntry way and check whether login was successful or not. But this is not enough for my case. I need to know why authentication failed(eg: password expiration, account locked, bad password count limit). Is there anyway of achieving this without using native win32 dll's. By the way this may not be a web project all the time. My optimal solution could be a generic one. Thanks for any help...
Upvotes: 2
Views: 674
Reputation: 2020
You should get the reason for the error in the exception.
Regardles of that you get the information if authentication will fail by using the PrincipalContext members like:
Upvotes: 1