So I opened up some code that hasn’t been touched in about 2 months.
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:
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.
Has anyone experienced this error with entity framework and SQL Azure specifically ?
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.
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.
Run the command line command netsh WinSock Show Catalog >> winsock.txt and then notepad winsock.txt to open the file.
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.
Below is a sample of what my clean system looks like for the output of the netsh WinSock Show Catalog file.