握手例外连接到SQL Server Azure的使用.NET 4.5时发生 [英] Handshake exception occurring when connecting to SQL Server Azure with .NET 4.5

查看:185
本文介绍了握手例外连接到SQL Server Azure的使用.NET 4.5时发生的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以,我打开了一些code尚未在约2个月被感动。

So I opened up some code that hasn't been touched in about 2 months.

我最后一次打开的所有单元测试通过应用程序。现在没有code改变了我所有的数据单元测试失败,出现以下错误:

Last time I opened the application all unit tests passed. Now with no code changes all my data unit tests fail with the following error:

初​​始化方法
  PerTrac.Pictor.Data.Test.RequestLogRepositoryShould.CreateLog扔
  例外。 System.Data.EntityException:System.Data.EntityException:
  基础提供开放式失败。 --->
  System.Data.SqlClient.SqlException:一个连接被成功
  与服务器建立,但随后在发生了错误
  pre-登录握手。 (提供者:SSL提供程序,error:0 - 等待
  操作超时)---> System.ComponentModel.Win32Exception:本
  等待操作超时。

Initialization method PerTrac.Pictor.Data.Test.RequestLogRepositoryShould.CreateLog threw exception. System.Data.EntityException: System.Data.EntityException: The underlying provider failed on Open. ---> System.Data.SqlClient.SqlException: A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: SSL Provider, error: 0 - The wait operation timed out.) ---> System.ComponentModel.Win32Exception: The wait operation timed out.

我知道有类似这样的现有的问题,但这些解决方案对我的情况没有影响都没有。

I realize there is an existing question similar to this, but those solutions had no effect what so ever on my situation.

有没有人经历过这种错误与实体框架和SQL Azure的具体?

Has anyone experienced this error with entity framework and SQL Azure specifically ?

我要指出,我可以从SSMS没有问题,使用这些相同的凭证进行连接。我没有强制加密残疾协议的设置,我已经恢复我的本地IIS几次。

I should note that I can connect from SSMS with no issue using them same credentials. I don't have Force Encryption set on disabled protocols and I have reset my local IIS several times.

推荐答案

最有可能你已经安装了使用去precated网络协议拦截网络流量您的计算机上的一些应用。正确的解决方案是希望禁用或卸载这些应用程序。

Most likely you have some application installed on your computer that is using deprecated network protocols to intercept network traffic. The correct solution is hopefully to disable or uninstall those applications.

运行命令行命令的的netsh的WinSock显示目录>> winsock.txt ,然后记事本winsock.txt 以打开该文件。

Run the command line command netsh WinSock Show Catalog >> winsock.txt and then notepad winsock.txt to open the file.

看每个 Winsock目录提供程序项返回。如果在服务标志值具有地址0x20000位设置,则提供程序使用IFS句柄和将正常工作。如果服务标记地址0x20000位清零(未设置),则它是一个非IFS BSP或LSP与可能是一个问题。尝试禁用该应用程序,并让我们知道,如果它然后工作。

Look at every Winsock Catalog Provider Entry returned. If the Service Flags value has the 0x20000 bit set then the provider uses IFS handles and will work fine. If the "Service Flags" 0x20000 bit is clear (not set), then it is a non-IFS BSP or LSP and could be an issue. Try disabling this application and let us know if it then worked.

忽略名称空间提供进入当你正在​​看的文本文件的结果。他们是没问题的。

Ignore the "Name Space Provider Entry" when you are looking at the text file results. They aren't the problem.

下面是什么我干净的系统看起来像在netsh的WinSock显示目录文件的输出样本。

Below is a sample of what my clean system looks like for the output of the netsh WinSock Show Catalog file.

Winsock Catalog Provider Entry
------------------------------------------------------
Entry Type:                         Base Service Provider
Description:                        MSAFD Tcpip [TCP/IP]
Provider ID:                        {E70F1AA0-AB8B-11CF-8CA3-00805F48A192}
Provider Path:                      %SystemRoot%\system32\mswsock.dll
Catalog Entry ID:                   1001
Version:                            2
Address Family:                     2
Max Address Length:                 16
Min Address Length:                 16
Socket Type:                        1
Protocol:                           6
Service Flags:                      0x20066
Protocol Chain Length:              1

Winsock Catalog Provider Entry
------------------------------------------------------
Entry Type:                         Base Service Provider
Description:                        MSAFD Tcpip [UDP/IP]
Provider ID:                        {E70F1AA0-AB8B-11CF-8CA3-00805F48A192}
Provider Path:                      %SystemRoot%\system32\mswsock.dll
Catalog Entry ID:                   1002
Version:                            2
Address Family:                     2
Max Address Length:                 16
Min Address Length:                 16
Socket Type:                        2
Protocol:                           17
Service Flags:                      0x20609
Protocol Chain Length:              1

Winsock Catalog Provider Entry
------------------------------------------------------
Entry Type:                         Base Service Provider
Description:                        MSAFD Tcpip [RAW/IP]
Provider ID:                        {E70F1AA0-AB8B-11CF-8CA3-00805F48A192}
Provider Path:                      %SystemRoot%\system32\mswsock.dll
Catalog Entry ID:                   1003
Version:                            2
Address Family:                     2
Max Address Length:                 16
Min Address Length:                 16
Socket Type:                        3
Protocol:                           0
Service Flags:                      0x20609
Protocol Chain Length:              1

Winsock Catalog Provider Entry
------------------------------------------------------
Entry Type:                         Base Service Provider
Description:                        MSAFD Tcpip [TCP/IPv6]
Provider ID:                        {F9EAB0C0-26D4-11D0-BBBF-00AA006C34E4}
Provider Path:                      %SystemRoot%\system32\mswsock.dll
Catalog Entry ID:                   1004
Version:                            2
Address Family:                     23
Max Address Length:                 28
Min Address Length:                 28
Socket Type:                        1
Protocol:                           6
Service Flags:                      0x20066
Protocol Chain Length:              1

Winsock Catalog Provider Entry
------------------------------------------------------
Entry Type:                         Base Service Provider
Description:                        MSAFD Tcpip [UDP/IPv6]
Provider ID:                        {F9EAB0C0-26D4-11D0-BBBF-00AA006C34E4}
Provider Path:                      %SystemRoot%\system32\mswsock.dll
Catalog Entry ID:                   1005
Version:                            2
Address Family:                     23
Max Address Length:                 28
Min Address Length:                 28
Socket Type:                        2
Protocol:                           17
Service Flags:                      0x20609
Protocol Chain Length:              1

Winsock Catalog Provider Entry
------------------------------------------------------
Entry Type:                         Base Service Provider
Description:                        MSAFD Tcpip [RAW/IPv6]
Provider ID:                        {F9EAB0C0-26D4-11D0-BBBF-00AA006C34E4}
Provider Path:                      %SystemRoot%\system32\mswsock.dll
Catalog Entry ID:                   1006
Version:                            2
Address Family:                     23
Max Address Length:                 28
Min Address Length:                 28
Socket Type:                        3
Protocol:                           0
Service Flags:                      0x20609
Protocol Chain Length:              1

Winsock Catalog Provider Entry
------------------------------------------------------
Entry Type:                         Base Service Provider
Description:                        RSVP TCPv6 Service Provider
Provider ID:                        {9D60A9E0-337A-11D0-BD88-0000C082E69A}
Provider Path:                      %SystemRoot%\system32\mswsock.dll
Catalog Entry ID:                   1007
Version:                            2
Address Family:                     23
Max Address Length:                 28
Min Address Length:                 28
Socket Type:                        1
Protocol:                           6
Service Flags:                      0x22066
Protocol Chain Length:              1

Winsock Catalog Provider Entry
------------------------------------------------------
Entry Type:                         Base Service Provider
Description:                        RSVP TCP Service Provider
Provider ID:                        {9D60A9E0-337A-11D0-BD88-0000C082E69A}
Provider Path:                      %SystemRoot%\system32\mswsock.dll
Catalog Entry ID:                   1008
Version:                            2
Address Family:                     2
Max Address Length:                 16
Min Address Length:                 16
Socket Type:                        1
Protocol:                           6
Service Flags:                      0x22066
Protocol Chain Length:              1

Winsock Catalog Provider Entry
------------------------------------------------------
Entry Type:                         Base Service Provider
Description:                        RSVP UDPv6 Service Provider
Provider ID:                        {9D60A9E0-337A-11D0-BD88-0000C082E69A}
Provider Path:                      %SystemRoot%\system32\mswsock.dll
Catalog Entry ID:                   1009
Version:                            2
Address Family:                     23
Max Address Length:                 28
Min Address Length:                 28
Socket Type:                        2
Protocol:                           17
Service Flags:                      0x22609
Protocol Chain Length:              1

Winsock Catalog Provider Entry
------------------------------------------------------
Entry Type:                         Base Service Provider
Description:                        RSVP UDP Service Provider
Provider ID:                        {9D60A9E0-337A-11D0-BD88-0000C082E69A}
Provider Path:                      %SystemRoot%\system32\mswsock.dll
Catalog Entry ID:                   1010
Version:                            2
Address Family:                     2
Max Address Length:                 16
Min Address Length:                 16
Socket Type:                        2
Protocol:                           17
Service Flags:                      0x22609
Protocol Chain Length:              1

Winsock Catalog Provider Entry
------------------------------------------------------
Entry Type:                         Base Service Provider (32)
Description:                        MSAFD Tcpip [TCP/IP]
Provider ID:                        {E70F1AA0-AB8B-11CF-8CA3-00805F48A192}
Provider Path:                      %SystemRoot%\system32\mswsock.dll
Catalog Entry ID:                   1001
Version:                            2
Address Family:                     2
Max Address Length:                 16
Min Address Length:                 16
Socket Type:                        1
Protocol:                           6
Service Flags:                      0x20066
Protocol Chain Length:              1

Winsock Catalog Provider Entry
------------------------------------------------------
Entry Type:                         Base Service Provider (32)
Description:                        MSAFD Tcpip [UDP/IP]
Provider ID:                        {E70F1AA0-AB8B-11CF-8CA3-00805F48A192}
Provider Path:                      %SystemRoot%\system32\mswsock.dll
Catalog Entry ID:                   1002
Version:                            2
Address Family:                     2
Max Address Length:                 16
Min Address Length:                 16
Socket Type:                        2
Protocol:                           17
Service Flags:                      0x20609
Protocol Chain Length:              1

Winsock Catalog Provider Entry
------------------------------------------------------
Entry Type:                         Base Service Provider (32)
Description:                        MSAFD Tcpip [RAW/IP]
Provider ID:                        {E70F1AA0-AB8B-11CF-8CA3-00805F48A192}
Provider Path:                      %SystemRoot%\system32\mswsock.dll
Catalog Entry ID:                   1003
Version:                            2
Address Family:                     2
Max Address Length:                 16
Min Address Length:                 16
Socket Type:                        3
Protocol:                           0
Service Flags:                      0x20609
Protocol Chain Length:              1

Winsock Catalog Provider Entry
------------------------------------------------------
Entry Type:                         Base Service Provider (32)
Description:                        MSAFD Tcpip [TCP/IPv6]
Provider ID:                        {F9EAB0C0-26D4-11D0-BBBF-00AA006C34E4}
Provider Path:                      %SystemRoot%\system32\mswsock.dll
Catalog Entry ID:                   1004
Version:                            2
Address Family:                     23
Max Address Length:                 28
Min Address Length:                 28
Socket Type:                        1
Protocol:                           6
Service Flags:                      0x20066
Protocol Chain Length:              1

Winsock Catalog Provider Entry
------------------------------------------------------
Entry Type:                         Base Service Provider (32)
Description:                        MSAFD Tcpip [UDP/IPv6]
Provider ID:                        {F9EAB0C0-26D4-11D0-BBBF-00AA006C34E4}
Provider Path:                      %SystemRoot%\system32\mswsock.dll
Catalog Entry ID:                   1005
Version:                            2
Address Family:                     23
Max Address Length:                 28
Min Address Length:                 28
Socket Type:                        2
Protocol:                           17
Service Flags:                      0x20609
Protocol Chain Length:              1

Winsock Catalog Provider Entry
------------------------------------------------------
Entry Type:                         Base Service Provider (32)
Description:                        MSAFD Tcpip [RAW/IPv6]
Provider ID:                        {F9EAB0C0-26D4-11D0-BBBF-00AA006C34E4}
Provider Path:                      %SystemRoot%\system32\mswsock.dll
Catalog Entry ID:                   1006
Version:                            2
Address Family:                     23
Max Address Length:                 28
Min Address Length:                 28
Socket Type:                        3
Protocol:                           0
Service Flags:                      0x20609
Protocol Chain Length:              1

Winsock Catalog Provider Entry
------------------------------------------------------
Entry Type:                         Base Service Provider (32)
Description:                        RSVP TCPv6 Service Provider
Provider ID:                        {9D60A9E0-337A-11D0-BD88-0000C082E69A}
Provider Path:                      %SystemRoot%\system32\mswsock.dll
Catalog Entry ID:                   1007
Version:                            2
Address Family:                     23
Max Address Length:                 28
Min Address Length:                 28
Socket Type:                        1
Protocol:                           6
Service Flags:                      0x22066
Protocol Chain Length:              1

Winsock Catalog Provider Entry
------------------------------------------------------
Entry Type:                         Base Service Provider (32)
Description:                        RSVP TCP Service Provider
Provider ID:                        {9D60A9E0-337A-11D0-BD88-0000C082E69A}
Provider Path:                      %SystemRoot%\system32\mswsock.dll
Catalog Entry ID:                   1008
Version:                            2
Address Family:                     2
Max Address Length:                 16
Min Address Length:                 16
Socket Type:                        1
Protocol:                           6
Service Flags:                      0x22066
Protocol Chain Length:              1

Winsock Catalog Provider Entry
------------------------------------------------------
Entry Type:                         Base Service Provider (32)
Description:                        RSVP UDPv6 Service Provider
Provider ID:                        {9D60A9E0-337A-11D0-BD88-0000C082E69A}
Provider Path:                      %SystemRoot%\system32\mswsock.dll
Catalog Entry ID:                   1009
Version:                            2
Address Family:                     23
Max Address Length:                 28
Min Address Length:                 28
Socket Type:                        2
Protocol:                           17
Service Flags:                      0x22609
Protocol Chain Length:              1

Winsock Catalog Provider Entry
------------------------------------------------------
Entry Type:                         Base Service Provider (32)
Description:                        RSVP UDP Service Provider
Provider ID:                        {9D60A9E0-337A-11D0-BD88-0000C082E69A}
Provider Path:                      %SystemRoot%\system32\mswsock.dll
Catalog Entry ID:                   1010
Version:                            2
Address Family:                     2
Max Address Length:                 16
Min Address Length:                 16
Socket Type:                        2
Protocol:                           17
Service Flags:                      0x22609
Protocol Chain Length:              1

Name Space Provider Entry
------------------------------------------------------
Description:                        Network Location Awareness Legacy (NLAv1) Namespace
Provider ID:                        {6642243A-3BA8-4AA6-BAA5-2E0BD71FDD83}
Name Space:                         15
Active:                             1
Version:                            0


Name Space Provider Entry
------------------------------------------------------
Description:                        E-mail Naming Shim Provider
Provider ID:                        {964ACBA2-B2BC-40EB-8C6A-A6DB40161CAE}
Name Space:                         37
Active:                             1
Version:                            0


Name Space Provider Entry
------------------------------------------------------
Description:                        PNRP Cloud Namespace Provider
Provider ID:                        {03FE89CE-766D-4976-B9C1-BB9BC42C7B4D}
Name Space:                         39
Active:                             1
Version:                            0


Name Space Provider Entry
------------------------------------------------------
Description:                        PNRP Name Namespace Provider
Provider ID:                        {03FE89CD-766D-4976-B9C1-BB9BC42C7B4D}
Name Space:                         38
Active:                             1
Version:                            0


Name Space Provider Entry
------------------------------------------------------
Description:                        Tcpip
Provider ID:                        {22059D40-7E9E-11CF-AE5A-00AA00A7112B}
Name Space:                         12
Active:                             1
Version:                            0


Name Space Provider Entry
------------------------------------------------------
Description:                        NTDS
Provider ID:                        {3B2637EE-E580-11CF-A555-00C04FD8D4AC}
Name Space:                         32
Active:                             1
Version:                            0


Name Space Provider Entry
------------------------------------------------------
Description:                        WindowsLive NSP
Provider ID:                        {4177DDE9-6028-479E-B7B7-03591A63FF3A}
Name Space:                         12
Active:                             1
Version:                            1


Name Space Provider Entry
------------------------------------------------------
Description:                        WindowsLive Local NSP
Provider ID:                        {229F2A2C-5F18-4A06-8F89-3A372170624D}
Name Space:                         19
Active:                             1
Version:                            1


Name Space Provider Entry (32)
------------------------------------------------------
Description:                        Network Location Awareness Legacy (NLAv1) Namespace
Provider ID:                        {6642243A-3BA8-4AA6-BAA5-2E0BD71FDD83}
Name Space:                         15
Active:                             1
Version:                            0


Name Space Provider Entry (32)
------------------------------------------------------
Description:                        E-mail Naming Shim Provider
Provider ID:                        {964ACBA2-B2BC-40EB-8C6A-A6DB40161CAE}
Name Space:                         37
Active:                             1
Version:                            0


Name Space Provider Entry (32)
------------------------------------------------------
Description:                        PNRP Cloud Namespace Provider
Provider ID:                        {03FE89CE-766D-4976-B9C1-BB9BC42C7B4D}
Name Space:                         39
Active:                             1
Version:                            0


Name Space Provider Entry (32)
------------------------------------------------------
Description:                        PNRP Name Namespace Provider
Provider ID:                        {03FE89CD-766D-4976-B9C1-BB9BC42C7B4D}
Name Space:                         38
Active:                             1
Version:                            0


Name Space Provider Entry (32)
------------------------------------------------------
Description:                        Tcpip
Provider ID:                        {22059D40-7E9E-11CF-AE5A-00AA00A7112B}
Name Space:                         12
Active:                             1
Version:                            0


Name Space Provider Entry (32)
------------------------------------------------------
Description:                        NTDS
Provider ID:                        {3B2637EE-E580-11CF-A555-00C04FD8D4AC}
Name Space:                         32
Active:                             1
Version:                            0


Name Space Provider Entry (32)
------------------------------------------------------
Description:                        WindowsLive NSP
Provider ID:                        {4177DDE9-6028-479E-B7B7-03591A63FF3A}
Name Space:                         12
Active:                             1
Version:                            1


Name Space Provider Entry (32)
------------------------------------------------------
Description:                        WindowsLive Local NSP
Provider ID:                        {229F2A2C-5F18-4A06-8F89-3A372170624D}
Name Space:                         19
Active:                             1
Version:                            1

这篇关于握手例外连接到SQL Server Azure的使用.NET 4.5时发生的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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