Reputation: 5072
using (PrincipalContext pc = new PrincipalContext(ContextType.Domain, domainName))
{
isWindowsAutenticated = pc.ValidateCredentials(username, password);
}
If pass to this code many wrong passwords for a user, then pass in the right password, it still returns false even though the password is definitely correct.
Any suggestions to get around this is appreciated.
Upvotes: 1
Views: 875
Reputation: 15159
It does matter what username
you pass in:
MSDN does not specify it but my experience says the first one is the only correct and comparison is case insensitive.
Upvotes: 1