I had a problem connecting to an instance of SQL Server 2012 running on Windows Server 2012. I have a Windows Forms.NET 4.5 application installed on a client machine running Windows 7. The error I am getting is this:
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.)
My connection string looks like this:
server=SERVERNAME;database=DATABASENAME;User Id=someuser;password=somepassword;Timeout=60;app=LabelMaker
I tried connecting to SQL Server from the client machine using QueryExpress and it worked! My application is 64 bit if that helps. I checked all the parameters that I can imagine in SQL Server. In the protocols (shared memory and tcp / ip), forced encryption is not enabled, the domain firewall is open on the server. I tried different connection strings with all kinds of unheard of parameters, always the same result, failure.
I'm really confused about why it works with QueryExpress? My application works when connected to a remote instance of SQL SERVER Express on another computer, it also works if I run it on a SQL Server 2012 machine.
I also tried to connect to the server from the client machine with LinqPad , and this is also very strange, with the new version based on net4 / 4.5 (Version: 4.43.06) it does not work, but when I use the old version of Linqpad (2.x) based on net3.5, it works!
It seems that Panda Security is causing the problem, I ran
netsh winsock show catalog
and found some Panda entries, then I reset
netsh winsock reset
now my application works fine, I rebooted the machine, ran the directory command again, the Panda entries were returned, and my application had the same problem as before.
The following are the Panda entries in the winsock directory: https://gist.github.com/pellehenriksson/5159883
All ideas and suggestions are welcome.
UPDATE
Panda v5 security issue is the cause of this problem, as confirmed by Panda support. The root cause of the problem is explained by Alex below. The client will upgrade to Panda version v670>, after testing I will check again.
Conclusion Moving to Panda Security v6.0 has fixed this problem.