The remote host closed the connection. The error code is 0x800704CD

前端 未结 6 1172
说谎
说谎 2020-12-03 00:33

I receive error emails from my website whenever an exception occurs. I am getting this error:

The remote host closed the connection. The error code is

6条回答
  •  悲哀的现实
    2020-12-03 00:51

    As m.edmondson mentioned, "The remote host closed the connection." occurs when a user or browser cancels something, or the network connection drops etc. It doesn't necessarily have to be a file download however, just any request for any resource that results in a response to the client. Basically the error means that the response could not be sent because the server can no longer talk to the client(browser).

    There are a number of steps that you can take in order to stop it happening. If you are manually sending something in the response with a Response.Write, Response.Flush, returning data from a web servivce/page method or something similar, then you should consider checking Response.IsClientConnected before sending the response. Also, if the response is likely to take a long time or a lot of server-side processing is required, you should check this periodically until the response.end if called. See the following for details on this property:

    http://msdn.microsoft.com/en-us/library/system.web.httpresponse.isclientconnected.aspx

    Alternatively, which I believe is most likely in your case, the error is being caused by something inside the framework. The following link may by of use:

    http://blog.whitesites.com/fixing-The-remote-host-closed-the-connection-The-error-code-is-0x80070057__633882307305519259_blog.htm

    The following stack-overflow post might also be of interest:

    "The remote host closed the connection" in Response.OutputStream.Write

提交回复
热议问题