Error occurred during the pre-login handshake

Try explicitly adding Application Name=MyAppName; to the connection string. Auto-generated value from the assembly name might exceed some limit.

Check network settings for things like explicitly limited frame size. Reboot router if SQL Server is running on another machine.

Try adding Pooling=False; to the connection string and checking whether this solves the problem with repeated connections on application restart.


What did the trick for me is increasing the timeout on the connection string, since when connecting by vpn it took to long to establish the connection. You can do this by adding ;connection timeout = value

I got the same error when connecting an application tried to connect to sql server while I was on a vpn.

By default the timeout is set to 15 seconds.

Seems you already have 60secs, maybe you just need more...

Hope it helps!