none
The Underlying connection was closed: An unexpected error occured on a receive RRS feed

  • Question

  • Below error shown @ my client machine where my windows application is running which will transfer data into server DB through a web service. where 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.

    But one weird thing is, 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)"



    • Edited by LeoniteMy Wednesday, July 9, 2014 8:39 AM
    Thursday, June 19, 2014 8:04 AM