I am using AD authentication in my application:
bool _isValid;
using (var pc = new PrincipalContext(ContextType.Domain, DomainPath))
{
isValid = pc.ValidateCredentials(username, password, ContextOptions.Negotiate);
}
Is there any way to find out if I am getting isValid
set to false
because of an invalid username or an invalid password?