SQL - an error occurred during the pre-login handshake
Solution 1
In my situation, I had a content filter/proxy called Covenant Eyes that was the likely cause.
I tried repairing the install of SQL server 2012 and it crashed the install and still did not fix the problem. As soon as I generated an uninstall code and uninstalled the filter, I could connect; I did not even have to reboot.
Check for proxies and content filters on the machine and disable them!
Solution 2
An answer propsed here: http://social.msdn.microsoft.com/Forums/en-US/vssetup/thread/2d11b6f9-3ada-4682-b643-c721a97af4ba
Sick of the problem? Dont know or care what winsock is or any of this low level crap means.
Go to a command prompt
do this
netsh Winsock reset
go on with your life and be happy.
Solution 3
In my particular setup, I was using storing session data in a custom database, I also had the data encrypted (Encrypt=True) via the connection string, removing this fixed the problem!
I suspect though that the data isn't being ssl encrypted as a result though, not much of an issue until we add more web servers though!
Solution 4
I did a system restore and I'm able to connect now.
Solution 5
I had the same issue, only for my local instance, only for Azure Data Studio (No problem with SSMS). It was a certificate problem. Check, in SQL Server Configuration Manager:
- SQL Server Network Configuration, right click on Protocols
- In Flags tab, Force Encryption = NO
- Restart SQL SERVER service
Related videos on Youtube
Rivka
Updated on September 18, 2022Comments
-
Rivka almost 2 years
Until yesterday evening, I was able to connect to my server from my local machine. Now, I get the following error:
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.) (.Net SqlClient Data Provider)
Note, I can log on to the actual server with no problem.
Yesterday, I installed IIS on my machine and set up a site using my IP address - don't know if this has anything to do.
I did come across this article, followed the steps, but didn't seem to help.
I also went through the following article, changed TC/IP settings, restarted, but nothing.
Started trying suggestions from comments too but stopped when I realized I might be messing things up more.
So, why is this happening / how can I fix?
-
Rivka almost 12 yearsThanks, tried that though already.
-
Rivka over 11 yearsWOW. This was a while ago, but we did and still do have Covenant Eyes installed on our machines.
-
Watki02 over 11 yearsI'm going to let them know of my issue... maybe they are using an old version of .NET? Here is the forum entry: gsfn.us/t/3s4ti
-
Admin over 11 yearsThank you Watki02, your answers (netsh Winsock reset) helps me to solve this problem for VB.Net clickOnce application develop in VS2010. Operation system Vista with .Net 4.5, to establish remote DB connection from Sql 2005 express edition to SQL 2005 Server.
-
Ilya Chernomordik over 10 yearsThanks, it did help me, don't know what it means though :)
-
Jeff Tian over 9 yearsWorks like a charm, and so fast!!!