Lesson Learned #278: TCP Provider, error: 0 – The specified network name is no longer available

This post has been republished via RSS; it originally appeared at: New blog articles in Microsoft Community Hub.

In some situations, our applications at the moment of the connection could face this type of error message: "

Error 64: A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 0 - The specified network name is no longer available.) and/or following with for System.Data.SqlClient.SqlException "A connection was successfully established with the server, but then an error occurred during the pre-login handshake." 

 

Following, I would like to share with you my experience in this type of issues.

 

Normally, this type of error message came from a TCP layer reset (either client or server) for multiple reasons and then fail immediately. In case that the situation is establishing the connection, my suggestion is treat this issue as transient issue and implement a connection retry-logic. 

 

Enjoy!

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.