ErrorCode=10054

Hello All

Having a little trouble with something that working with VS2003. Let me explain what my app does it is an employee list so all people can stay in sync with local database.

This is a PPC2003 app that goes to my website runs a page that generates an XML file lit a RSS Feed.

Dim sr As New IO.StreamReader(response.GetResponseStream)

While Not reader.ReadState = Xml.ReadState.EndOfFile

If reader.Name.ToLower = "item" Then

'create new row in the table

If Not reader.NodeType = Xml.XmlNodeType.EndElement Then

'add the data to the row

'read the next element from the stream

Dim outerXML As String = reader.ReadOuterXml

From here it reads each record in one at a time and does a INSERT INTO a SQL Server 2005 Mobile database on the PPC2003 device.

Now I keep geeting the following error below since I have been trying to update to VS2005. It stops in the same spot everytime so I am trying to track down if it is bad data. From what I can see all is good. Any help would be appretiated.

System.Net.Sockets.SocketException was unhandled
ErrorCode=10054
Message="An existing connection was forcibly closed by the remote host"
StackTrace:
at System.Net.Sockets.Socket.ReceiveNoCheck()
at System.Net.Sockets.Socket.Receive()
at System.Net.Connection.Read()
at ConnectionClient.Read()
at System.Net.HttpReadStream.NetworkRead()
at System.Net.ChunkedReadStream.fillBuffer()
at System.Net.ChunkedReadStream.copyBytes()
at System.Net.ChunkedReadStream.doRead()
at System.Net.HttpReadStream.Read()
at System.IO.StreamReader.ReadBuffer()
at System.IO.StreamReader.Read()
at System.Xml.XmlTextReaderImpl.ReadData()
at System.Xml.XmlTextReaderImpl.ReadDataInName()
at System.Xml.XmlTextReaderImpl.ParseQName()
at System.Xml.XmlTextReaderImpl.ParseQName()
at System.Xml.XmlTextReaderImpl.ParseElement()
at System.Xml.XmlTextReaderImpl.ParseElementContent()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.XmlTextReader.Read()
at System.Xml.XmlWriter.WriteNode()
at System.Xml.XmlReader.ReadOuterXml()
at Employee_List_PPC2003.frmMain.ProcessResponse()
at Employee_List_PPC2003.frmMain.StartEmployeeUpdate()
at Employee_List_PPC2003.frmMain.mnuUpdate_Click()
at System.Windows.Forms.MenuItem.OnClick()
at System.Windows.Forms.Menu.ProcessMnuProc()
at System.Windows.Forms.Form.WnProc()
at System.Windows.Forms.Control._InternalWnProc()
at Microsoft.AGL.Forms.EVL.EnterMainLoop()
at System.Windows.Forms.Application.Run()
at Employee_List_PPC2003.frmMain.Main()




Answer this question

ErrorCode=10054

  • Craig Selbert

    This exception means the server closed the connection. You will want to check the following:

    1. You have used the correct credentials to establish the connection (if the server requires authentication)

    2. Try setting KeepAlive = False on the client app. This forces the client to establish a new connection with each request.



  • ErrorCode=10054