【问题标题】:C# A call to SSPI failed, see inner exception - The Local Security Authority cannot be contactedC# 对 SSPI 的调用失败,请参阅内部异常 - 无法联系本地安全机构
【发布时间】:2016-06-25 17:29:40
【问题描述】:

我编写了一个 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 服务器版本 (5.5) 受我使用的 MySql Connector/Net 版本 (6.9) 的支持。

重要提示:它适用于早期的 Windows 10,但不适用于最新的 Windows 10。 我的朋友在 Windows 7 和 8.1 中成功测试了它。 可能是 Windows 更新搞砸了。

我阅读here 的一个解决方案:必须编辑注册表,但它不起作用。

【问题讨论】:

    标签: c# mysql .net exception ssl


    【解决方案1】:

    我遇到了同样的问题,我认为这与 windows 10 的最新安全更新有关。 当我将连接字符串更改为为我的连接启用 SSL 加密时,错误消失了... 编辑:更新mysql-server-5.5后错误解决

    【讨论】:

      猜你喜欢
      • 2016-10-21
      • 2016-04-10
      • 2021-06-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-12-18
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多