The underlying connection was closed: An unexpected error occurred on a receive

转自:

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

Symptom

You application is 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 an error occurs in the application. In the Error Log you see an entry similar to (below example is 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 was forcibly closed by the remote host.

   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 was 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 was being made) did not deliver a response to your request and cut the connection before an answer could be sent. Meaning:

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

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

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

    • 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 is to an OutSystems Platform) you may want to look here.
    • The remote server is having issues. E.g. application pool recycling or crashes that interrupt logic that may be runnning.
    • A network layer is cutting the network connection half-way. You may see errors in the remote server similar to this one (e.g. "could not flush response);
时间: 2024-10-14 03:01:25

The underlying connection was closed: An unexpected error occurred on a receive的相关文章

The underlying connection was closed: An unexpected error occurred on a send

操作系统是Windows Server 2003 x64 SP2,使用Framework 4.0,在使用WebClient访问某些特定的HTTPS站点时,会引发异常: Unhandled Exception: System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.IO.IOException: Authentication

the underlying conncetion was closed an unexpected error occurred on a receive

.Net  winform 程序可以运行,但是具体操作,查询,打印时 报错: 查了半天也不知是什么情况,因为在自己的电脑及服务器上运行正常,但是现场人员老是报错, 排除问题思路: 程序问题: 本地和服务器都Ok       pass 电脑环境问题:让现场人员换了几台电脑,问题一样       pass 网络问题:让网络工程师排查,为域账号权限问题          over

The underlying connection was closed

转自: https://support.microsoft.com/en-us/kb/915599 SUMMARY This article describes error messages that you may receive when you use the Microsoft .NET Framework 1.1 Service Pack 1 (SP1) to make HTTP requests or when you call a Web service. SYMPTOMS Whe

[WebException: The underlying connection was closed: The message length limit was exceeded.]解决方法

[WebException: The underlying connection was closed: The message length limit was exceeded.]   System.Net.HttpWebRequest.GetResponse() response headers 最多 64 kb限制 HttpWebRequest.DefaultMaximumResponseHeadersLength = -1; // unlimited

windows xp .net framework 4.0 HttpWebRequest 报The underlying connection was closed,基础连接已关闭

windows xp .net framework 4.0 HttpWebRequest 报The underlying connection was closed,基础连接已关闭,错误的解决方法 在 HttpWebRequest 请求的上方加入以下代码 ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3; 原文地址:https://www.cnblogs.com/icejd/p/11690919.html

微信证书 javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty

这几天在做微信退款接口,按照api写完之后,在本地测试了下没有问题,于是交给测试让他们在测试环境开测.他们说退款没有成功,感觉去查日志,发现后台报了 javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty .退款证书没

Unexpected error: UnicodeDecodeError: 'ascii' codec can't decode byte 0xd2 in position 69: ordinal not in range(128)-解决办法

经核对,字典中缺少“,”所致: Unexpected error: UnicodeDecodeError: 'ascii' codec can't decode byte 0xd2 in position 69: ordinal not in range(128)-解决办法

org.openqa.selenium.remote.SessionNotFoundException: Unexpected error launch IE

1.在启动ie浏览器前先加入属性设置一项: DesiredCapabilities ie = DesiredCapabilities.internetExplorer(); ie.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true); System.setProperty("webdriver.ie.driver", "e:/IEDriverSe

【总算解决了】A network-related or instance-specific error occurred while establishing a connection to SQL Server

给别人做的网站莫名其妙连接不上数据库.百度了好多,总算知道自己的错在哪了. 报 "A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server