SqlException during the pre-login handshake
I ported my SQL Server DB from local to production environment and suddenly faced the following error during connect
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 - A system shutdown is in progress.)
There is nothing special in Entity Framework connection string though:
... connectionString="metadata=res://*/EF.DataBaseModel.csdl|res://*/EF.DataBaseModel.ssdl|res://*/EF.DataBaseModel.msl;
provider=System.Data.SqlClient;
provider connection string='data source=server-ip\SQLEXPRESS2008R2;initial catalog=db;user id=user;password=password;multip开发者_StackOverflowleactiveresultsets=True;App=EntityFramework'"
providerName="System.Data.EntityClient" />
What can be wrong here ? Thank you in advance!
Look here: http://social.msdn.microsoft.com/Forums/eu/sqlsecurity/thread/3d027059-7457-4671-94f9-008b10013fde
I found out that this error relates to a DB Cluster failover. Go to Failover cluster manager and check for cluster events/errors. You should be able to see the exact time when it failed over(even if the message only says 'unexpected failover occurred'
I found the exact same error but, contrary to @Dalex post, the environment only haves 2 client machines and one single Sql Server. There is no Cluster.
The client machines run jobs that can acquire several connections to different databases. When many jobs start at the same time this error raises some of the times.
I also found the link http://social.msdn.microsoft.com/Forums/eu/sqlsecurity/thread/3d027059-7457-4671-94f9-008b10013fde useful. In my case i try to mitigate the problem by reusing connections as explained in the post, as most as possible. Unfortunately, can't reuse connections at parts of the job that run in parallel.
精彩评论