我写了一个C#程序来连接MySql服务器和' Mysql Connector/Net'。 我使用ssl选项的安全连接。我太正确地制作了服务器证书和客户端pfx证书。 但是当我试图连接到服务器时,我得到了这个例子。
System.Security.Authentication.AuthenticationException: A call to SSPI failed, see inner exception. ---> System.ComponentModel.Win32Exception: The Local Security Authority cannot be contacted
--- End of inner exception stack trace ---
at System.Net.Security.SslState.StartSendAuthResetSignal(ProtocolToken message, AsyncProtocolRequest asyncRequest, Exception exception)
at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult)
我使用的MySql Connector / Net版本支持MySql服务器版本(5.5)(6.9)。
重要提示:它在早期的Windows 10中有效,但在Windows 10中却不是最新的。 我的朋友在Windows 7和8.1中成功测试了它。 也许Windows更新搞砸了。
我读了here解决方案:必须编辑注册表,但它不起作用。
答案 0 :(得分:1)
我遇到了同样的问题,我认为它与Windows 10的最新安全更新有关。 当我将连接字符串更改为我的连接的SSL加密时,错误消失了... 编辑:更新mysql-server-5.5后错误解决