transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - The specified network name is no longer available.

Hi All,

getting below error while executing a query. It is failing while running ExecuteReader() in C# code. Please Help.

System.ComponentModel.Win32Exception (0x80004005): The specified network name is no longer available, MESSAGE:A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - The specified network name is no longer available.), DETAILS:System.Data.SqlClient.SqlException (0x80131904): A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - The specified network name is no longer available.) ---> System.ComponentModel.Win32Exception (0x80004005): The specified network name is no longer available
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error)
   at System.Data.SqlClient.TdsParserStateObject.ReadSniSyncOverAsync()
   at System.Data.SqlClient.TdsParserStateObject.TryReadNetworkPacket()
   at System.Data.SqlClient.TdsParserStateObject.TryPrepareBuffer()
   at System.Data.SqlClient.TdsParserStateObject.TryReadByte(Byte& value)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
   at System.Data.SqlClient.SqlDataReader.get_MetaData()
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader()
ClientConnectionId:058f01f1-0473-4b07-9b58-9832972bf153

Regards,

Abhinaw



  • Edited by AbhinawK Friday, August 28, 2015 12:28 PM
August 28th, 2015 8:13am

Typically that message indicates dead network connection. For additional assistance can you post code as well?

Reference:

http://stackoverflow.com/questions/27590614/a-transport-level-error-has-occurred-when-receiving-results-from-the-server-erro

http://stackoverflow.com/questions/9117526/i-get-this-sql-a-transport-level-error-but-not-all-the-time

Free Windows Admin Tool Kit Click here and download it now
August 28th, 2015 3:35pm

Hi Kalman,

Thanks for your reply. here this is happening for only one query all other queries are working fine. I have tried executing the query in Query Analyzer and that also executes fine.

I have cross checked the DataType, parameters and the size of resultset as well; everything is fine.

I have put extra trace information in my application and it is returning SQL Error Number : 64 while executing 

cmd.ExecuteReader();


Regards,

Abhinaw

August 31st, 2015 2:07am

Hi Abhinaw,

Make sure the issues below and try to connect it again remotely.
1) SQL Server should be up and running. 
2) Enable TCP/IP in SQL Server Configuration
3) Open Port in Windows Firewall
4) Enable Remote Connection
5) Enable SQL Server Browser Service
6) Create exception of sqlbrowser.exe in Firewall

For more information, refer to:
http://relyonsoft.com/techsupport/?p=143 
http://www.escapekeys.com/blog/index.cfm/2011/1/26/Microsoft-SQL-Server-Error-64-A-connection-was-successfully-established-with-the-server.

Free Windows Admin Tool Kit Click here and download it now
August 31st, 2015 2:27am

Hi Milan,

Thanks for your reply.

I have tried all the above mentioned options; however firewall is off on both (SQL Server & WebServer) machines.

Anyways I am going to raise this with Microsoft; let's see what is their observation.

Will post the Solution/resolution if i get any.

Regards,

Abhinaw

August 31st, 2015 3:40am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics