none
Underlying Connection closed unexpectedly RRS feed

  • Question

  • I'm getting below error at my client machine where my windows application is running which will transfer data to copy into server DB through a web service. My webservice is hosted in Server 2008 R2. The data transfer size is a bit huge and will take time to complete. After a while the transfer is started, below exception occurs at client.

    I even tried to increase execution timeout & maxrequestlength to my webservice which indeed doesn't helped me to solve the issue. Also i don't find any failed trace logs.

    Even after i quit the exception, webservice is still continuing its job at server side.

    Can someone help to handle this ?

    "Error System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a receive. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
       at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
       at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
       --- End of inner exception stack trace ---
       at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
       at System.Net.PooledStream.Read(Byte[] buffer, Int32 offset, Int32 size)
       at System.Net.Connection.SyncRead(HttpWebRequest request, Boolean userRetrievedStream, Boolean probeRead)"

    Thursday, June 19, 2014 8:16 AM