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

    Pregunta

  • I have a little desktop app which uses VB.Net in Vstudio2008 and connects to SQL Server 2000 which sometimes gives gives this error msg (appears to be when first returning a dataset object; full exception text below).

    The Distributed Transaction Coordinator (DTC) service is started on all of the machines involved below.

    The database server is named MDWDATA; my desktop PC is named JOHNXP; my domain server is named HAMMERHEAD (all machines in same LAN subnet). When I launch the .exe from JOHNXP (via Vstudio 2008) the error does not seem to occur. I installed the program on HAMMERHEAD as a "ClickOnce" deployment for other users here to use and when launched from HAMMERHEAD this error occurs when populating the first dataset object (NOTE: clicking CONTINUE button seems to dismiss the error msgbox without impairing the remaining operations of the program):

    See the end of this message for details on invoking 
    just-in-time (JIT) debugging instead of this dialog box.
    
    ************** Exception Text **************
    System.Data.SqlClient.SqlException: 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.)
       at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
       at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
       at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
       at System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error)
       at System.Data.SqlClient.TdsParserStateObject.ReadSni(DbAsyncResult asyncResult, TdsParserStateObject stateObj)
       at System.Data.SqlClient.TdsParserStateObject.ReadNetworkPacket()
       at System.Data.SqlClient.TdsParserStateObject.ReadBuffer()
       at System.Data.SqlClient.TdsParserStateObject.ReadByte()
       at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
       at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
       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)
       at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
       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.ExecuteDbDataReader(CommandBehavior behavior)
       at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
       at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
       at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
       at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
       at AccountMaintenance.frmUser.LoadAccLvlsInfo()
       at AccountMaintenance.frmUser.DBGridAccUser_SelectionChanged(Object sender, EventArgs e)
       at System.Windows.Forms.DataGridView.OnSelectionChanged(EventArgs e)
       at System.Windows.Forms.DataGridView.FlushSelectionChanged()
       at System.Windows.Forms.DataGridView.set_NoSelectionChangeCount(Int32 value)
       at System.Windows.Forms.DataGridView.ClearSelection(Int32 columnIndexException, Int32 rowIndexException, Boolean selectExceptionElement)
       at System.Windows.Forms.DataGridView.SetAndSelectCurrentCellAddress(Int32 columnIndex, Int32 rowIndex, Boolean setAnchorCellAddress, Boolean validateCurrentCell, Boolean throughMouseClick, Boolean clearSelection, Boolean forceCurrentCellSelection)
       at System.Windows.Forms.DataGridView.MakeFirstDisplayedCellCurrentCell(Boolean includeNewRow)
       at System.Windows.Forms.DataGridView.OnRowCollectionChanged_PostNotification(Boolean recreateNewRow, Boolean allowSettingCurrentCell, CollectionChangeAction cca, DataGridViewRow dataGridViewRow, Int32 rowIndex)
       at System.Windows.Forms.DataGridViewRowCollection.OnCollectionChanged_PostNotification(CollectionChangeAction cca, Int32 rowIndex, Int32 rowCount, DataGridViewRow dataGridViewRow, Boolean changeIsDeletion, Boolean changeIsInsertion, Boolean recreateNewRow, Point newCurrentCell)
       at System.Windows.Forms.DataGridViewRowCollection.OnCollectionChanged(CollectionChangeEventArgs e, Int32 rowIndex, Int32 rowCount)
       at System.Windows.Forms.DataGridViewRowCollection.AddInternal(DataGridViewRow dataGridViewRow)
       at System.Windows.Forms.DataGridView.RefreshRows(Boolean scrollIntoView)
       at System.Windows.Forms.DataGridView.RefreshColumnsAndRows()
       at System.Windows.Forms.DataGridView.OnDataMemberChanged(EventArgs e)
       at System.Windows.Forms.DataGridView.set_DataMember(String value)
       at AccountMaintenance.frmUser.LoadUserInfo()
       at AccountMaintenance.frmUser.frmuser_Load(Object sender, EventArgs e)
       at System.Windows.Forms.Form.OnLoad(EventArgs e)
       at System.Windows.Forms.Form.OnCreateControl()
       at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
       at System.Windows.Forms.Control.CreateControl()
       at System.Windows.Forms.Control.WmShowWindow(Message& m)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
       at System.Windows.Forms.ContainerControl.WndProc(Message& m)
       at System.Windows.Forms.Form.WmShowWindow(Message& m)
       at System.Windows.Forms.Form.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    
    
    ************** Loaded Assemblies **************
    mscorlib
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.3082 (QFE.050727-3000)
        CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
    ----------------------------------------
    AccountMaintenance
        Assembly Version: 1.0.0.0
        Win32 Version: 1.0.0.0
        CodeBase: file:///C:/Documents%20and%20Settings/johna/Local%20Settings/Apps/2.0/351XH0Z5.APB/8R2TZCDA.Z6Y/acco..tion_71d7cddf08c774b1_0001.0000_9f049b4502890aed/AccountMaintenance.exe
    ----------------------------------------
    Microsoft.VisualBasic
        Assembly Version: 8.0.0.0
        Win32 Version: 8.0.50727.3053 (netfxsp.050727-3000)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
    ----------------------------------------
    System
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
    ----------------------------------------
    System.Windows.Forms
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
    ----------------------------------------
    System.Drawing
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
    ----------------------------------------
    System.Configuration
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
    ----------------------------------------
    System.Xml
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.3082 (QFE.050727-3000)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
    ----------------------------------------
    System.Runtime.Remoting
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
    ----------------------------------------
    System.Data
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
    ----------------------------------------
    System.Transactions
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Transactions/2.0.0.0__b77a5c561934e089/System.Transactions.dll
    ----------------------------------------
    System.EnterpriseServices
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.EnterpriseServices/2.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll
    ----------------------------------------
    
    ************** JIT Debugging **************
    To enable just-in-time (JIT) debugging, the .config file for this
    application or computer (machine.config) must have the
    jitDebugging value set in the system.windows.forms section.
    The application must also be compiled with debugging
    enabled.
    
    For example:
    
    <configuration>
        <system.windows.forms jitDebugging="true" />
    </configuration>
    
    When JIT debugging is enabled, any unhandled exception
    will be sent to the JIT debugger registered on the computer
    rather than be handled by this dialog box.
    
    
    
    viernes, 09 de octubre de 2009 16:22

Todas las respuestas

  • open a command window and start ping mwdata -t  and see the server is pinging continuously and start your program - and see if you get any networks packet drops.


    Manoj
    sábado, 10 de octubre de 2009 4:14
  • Thanks for your idea. I opened a cmd window; set the current directory to the folder where my SETUP.EXE exists; then I issued:

        ping mdwdata - t

    The MDWDATA server is pinged continuously in this cmd window. Response is generally less than 1 ms.

    I open up another cmd window to same path. This time is run SETUP.EXE (remember this is a ClickOnce app).

    The program starts OK. Upon the first SELECT to a SQL database, I get the same message as shown in the start of this thread. I just click CONTINUE and sort of ignore the error. All seems to be OK and program continues.

    Back in the original CMD window, the server is still being pinged continously and without error. Might be my imagination but around the time of the error msg, it seems like that was the one PING response that creeped up to about 4ms (all others were < 1ms).

    Can someone shed more light on this strange error?
    martes, 13 de octubre de 2009 21:32