Search code examples
databasessmsazure-sql-databaselinqpad

Unable to connect to SQL Azure with SSMS, LinqPad; SQLCMD works fine


I have been using SSMS and LinqPad both for months to connect to SQL Azure instances without issue. Suddenly this week, linqpad stopped connecting, consistently timing out and displaying this error message: "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.)"

enter image description here

At first, it was just LinqPad. But soon after I started experiencing the same issue with SSMS 2012. It showed the exact same error message (slightly different dialog).

I've confirmed that this isn't a firewall rule issue. My IP has been allowed through the SQL firewall for months, and I can still connect using the same credentials using SQLCMD and I can run queries.

Any ideas? Why would SSMS and LinqPad both take a big dump while SQLCMD still works?


Solution

  • I finally found the solution to this (I think I may have found it via https://stackoverflow.com/questions/13420770/pre-login-handshake-error-connecting-directly-to-sql-azure). I installed some completely unrelated software about the time that things stopped working. As it happens, said software also installs - silently - some bundled software that leaves you with custom Winsock LSPs in place, which means the system is then afflicted by an issue reported to Microsoft and addressed in KB 2568167. Fortunately, I didn't have to manually remove the LSPs because I was able to uninstall the unwelcome software (Sendori!).