Skip to content

Commit

Permalink
catch DirectoryOperationException to check Negotiate as for LdapExcep…
Browse files Browse the repository at this point in the history
…tion (dotnet#52748)

resolves dotnet#51222

Co-authored-by: Trivalik <[email protected]>
  • Loading branch information
trivalik and Trivalik authored Jun 15, 2021
1 parent 4ca04f1 commit ce95c98
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,10 @@ public bool Validate(string userName, string password)
// we don't return false here even if we failed with ERROR_LOGON_FAILURE. We must check Negotiate
// because there might be cases in which SSL fails and Negotiate succeeds
}
catch (DirectoryOperationException)
{
// see LdapException
}

BindLdap(networkCredential, defaultContextOptionsNegotiate);
_lastBindMethod = AuthMethod.Negotiate;
Expand Down

0 comments on commit ce95c98

Please sign in to comment.