As M. Edmondson mentioned, "the remote host has closed the connection." happens when a user or browser cancels something, or the network connection drops, etc. However, it does not have to be a file download, but only any request for any resource that gives an answer to the client. Basically, an error means that the answer cannot be sent, because the server can no longer talk to the client (browser).
There are several steps you can take to stop this. If you manually send something in response with Response.Write, Response.Flush, return data from the web servivce / page method or something like that, then you should consider checking Response.IsClientConnected before sending a response. Also, if the response is likely to take a long time or requires a lot of server-side processing, you should check it periodically until response.end is called. For more information about this property, see the following:
http://msdn.microsoft.com/en-us/library/system.web.httpresponse.isclientconnected.aspx
As an alternative, most likely, in your case, the error occurs due to something inside the frame. The following link can be used:
http://blog.whitesites.com/fixing-The-remote-host-closed-the-connection-The-error-code-is-0x80070057__633882307305519259_blog.htm
The following post might also be interesting:
"Remote host closed the connection" in Response.OutputStream.Write
Sam Shiles Mar 08 2018-12-12T00: 00Z
source share