The underlying connection was Closed:an unexpected error occurred on a receive

Source: Internet
Author: User

Turn from:

http://www.outsystems.com/forums/discussion/15641/ tip-the-underlying-connection-was-closed-an-unexpected-error-occurred-on-a-rece/

Symptom

You application are making a call to another system performing an HTTP (S) request. This request can be a:

    • Web Service Call (SOAP or REST)
    • A request to a specific web-page
    • Sending an email
    • ...

The call is failing and a error occurs in the application. In the "Error Log you see" an entry similar to (below example are for a SOAP web-reference):

[1] The underlying connection was Closed:an unexpected error occurred on a receive. At System.Web.Services.Protocols.WebClientProtocol.GetWebResponse (WebRequest request) At System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse (WebRequest request) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke (String methodName, object[] parameters) At ssCRMApp.WRefPeopleLookup.WRefPeopleLookup.SearchByName (String search) [2] Unable to read data from the transport Connection:an existing connection is forcibly closed by the remote host.< /c3> 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) [3] An existing connection is forcibly closed by the remote host At System.Net.Sockets.NetworkStream.Read (byte[] buffer, Int32 offset, Int32 size)


Cause
Errors like these happen because the remote server (to which the call is being made) did not deliver a response to your R Equest and cut the connection before an answer could is sent. Meaning:

    1. Your application (the caller) sent the request
    2. While the application is waiting for the response, the remote server cut the connection.


Resolution
Resolving such a problem cannot be do on the caller side (your application)-your need to work with the party that Provi Des the service for you.

If You is the other party or want to help:common causes on the other side for these errors is:

      • The request is taking too long-to-run and the server "times it Out". If another Outsystems Platform is on the receiving end (Meaning:the Web call was to a outsystems Platform) you may want t o look here.
      • The remote server is having a issues. e.g. application pool recycling or crashes that interrupt logic so may be runnning.
      • A Network layer is cutting the network connection Half-way. Errors in the remote server similar to this one (e.g. "could not flush response);

The underlying connection was Closed:an unexpected error occurred on a receive

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.