未验证 提交 ce95c98f 编写于 作者: T Trivalik 提交者: GitHub

catch DirectoryOperationException to check Negotiate as for LdapException (#52748)

resolves https://github.com/dotnet/runtime/issues/51222Co-authored-by: NTrivalik <rborchert@live.de>
上级 4ca04f1c
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册