如何修复连接到 SQL Server 的错误:SSL 提供程序,错误:0 - 收到的消息意外或格式错误 [英] How do I fix an error connecting to SQL Server: SSL Provider, error: 0 - The message received was unexpected or badly formatted

查看:26
本文介绍了如何修复连接到 SQL Server 的错误:SSL 提供程序,错误:0 - 收到的消息意外或格式错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用 Visual Studio 2012(或 2013)从我的本地开发箱连接到 SQL Server 2008R2 SP1 时,我收到此消息:

<块引用>

已成功与服务器建立连接,但随后出现登录过程中发生错误.(提供者:SSL 提供者,错误:0 - 收到的消息意外或格式错误.)

我本地的.Net框架版本是4.5.50938

我的同事有完全相同的问题.我也相信我在重新安装电脑之前遇到了问题,当时我安装了 SSMS 2012,因为这也依赖于 .Net framework 4,而不是 .Net v2 作为 SSMS2008R2,它工作正常.Visual Studio 中的内部数据工具依赖于 .Net 4 也是有道理的.

这个问题并不总是存在,我相信它是在我第一次安装 Visual Studio 2013 时引入的 - 然后在重新安装后再次出现,很可能是在更新 .Net 框架之后.

在我看来,当连接到 SQL Server 2008R2 SP1 时,该问题与此版本的 .Net 框架中的 System.Data 有关.

我该如何解决这个问题?是否有任何已知的修复、更新等?

遗憾的是,目前无法更新 SQL Server 2008R2SP1.

我也搜索了解决方案,但到目前为止还没有找到任何可用的方法.以下是指向其他具有类似问题的帖子的链接:

参考:http://support.microsoft.com/kb/2915689

When connecting from my local dev box using Visual Studio 2012 (or 2013) against a SQL Server 2008R2 SP1, I get this message:

A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - The message received was unexpected or badly formatted.)

My version of .Net framework locally is 4.5.50938

My colleague has the exact same problem. I also believe I had the problem earlier, before re-installing the pc, when I had SSMS 2012 installed, as that also relies on .Net framework 4, not .Net v2 as SSMS2008R2, which works fine. It would also make sense, that the internal data tooling in visual studio relies on .Net 4.

The problem has not always been there, and I believe it was introduced when I first installed Visual Studio 2013 - and then again later after a reinstall, most likely after updating the .Net framework.

The problem seems to me to be related to System.Data in this version of the .Net framework, when connecting against a SQL Server 2008R2 SP1.

How can I fix this? Are there any known fixes, updates etc?

Unfortunately updating SQL Server 2008R2SP1 is not currently an option.

I have also searched for solutions, but have found nothing usable, so far. Here are a couple of links to other posts with similar issue:

http://social.msdn.microsoft.com/Forums/en-US/ea2c470f-14ba-4864-8a39-1396f4e361e8/sqlconnection-now-failing-exception-when-connecting-to-remote-instance?forum=sqldataaccess

http://www.sqlservercentral.com/Forums/Topic1529609-2799-1.aspx

解决方案

You are only left with the following options as instructed by Microsoft:

  • Uninstall offending LSP or BSP (i.e., Sophos Antivirus)
  • Uninstall .NET Framework 4.5.1 (therefore, VS 2013 will not work)
  • Install .NET Framework 4.5.2

Reference: http://support.microsoft.com/kb/2915689

这篇关于如何修复连接到 SQL Server 的错误:SSL 提供程序,错误:0 - 收到的消息意外或格式错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆