Remote host closed the connection

0

spent quite a while now looking into The remote host closed the connection. The error code is 0x80070057 problem. Here is the complete exception details:

<error
  host="Testserver"
  type="System.Web.HttpException"
  message="The remote host closed the connection. The error code is 0x80070057."
  source="System.Web"
  detail="System.Web.HttpException: 
  The remote host closed the connection. The error code is 0x80070057.&#xD;&#xA; 
  at System.Web.Hosting.IIS7WorkerRequest.RaiseCommunicationError(Int32 result, Boolean throwOnDisconnect)&#xD;&#xA;   
  at System.Web.Hosting.IIS7WorkerRequest.ExplicitFlush()&#xD;&#xA;   at System.Web.HttpResponse.Flush(Boolean finalFlush)&#xD;&#xA;  
  at System.Web.HttpResponse.Flush()&#xD;&#xA;   
  at System.Web.HttpResponseWrapper.Flush()&#xD;&#xA; 
  at test.Core.Utils.BufferedStreamCopy.Copy(Stream source, Stream output, Action flushDelegate, Func`1 streamPredicate)&#xD;&#xA; 
  at test.Core.Utils.BufferedStreamCopy.CopyToResponse(Stream source, HttpResponseBase response)&#xD;&#xA;   
  at test.Core.Utils.BufferedStreamCopy.Proxy(HttpWebResponse incoming, HttpResponseBase outgoing)&#xD;&#xA;   
  at test.Util.Web.HttpDirectResponse.ProxyToResponse(HttpResponseBase clientResponse)&#xD;&#xA;   
  at test.Core.Mvc.Extensions.ActionResults.ProxyResult.ExecuteResult(ControllerContext context)&#xD;&#xA; 
  at System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult)&#xD;&#xA;   
  at System.Web.Mvc.ControllerActionInvoker.&lt;&gt;c__DisplayClass11.&lt;InvokeActionResultWithFilters&gt;b__e()&#xD;&#xA;
  at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation)&#xD;&#xA; 
  at System.Web.Mvc.ControllerActionInvoker.&lt;&gt;c__DisplayClass11.&lt;&gt;c__DisplayClass13.&lt;InvokeActionResultWithFilters&gt;b__10()&#xD;&#xA; 
  at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult)&#xD;&#xA; 
  at System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName)&#xD;&#xA; 
  at System.Web.Mvc.Controller.ExecuteCore()&#xD;&#xA;   at System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext)&#xD;&#xA; 
  at System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext)&#xD;&#xA;  
  at System.Web.Mvc.MvcHandler.ProcessRequest(HttpContextBase httpContext)&#xD;&#xA; 
  at System.Web.Mvc.MvcHandler.ProcessRequest(HttpContext httpContext)&#xD;&#xA;   
  at System.Web.Mvc.MvcHandler.System.Web.IHttpHandler.ProcessRequest(HttpContext httpContext)&#xD;&#xA;  
  at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()&#xD;&#xA; 
  at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp; completedSynchronously)"
  user="mw@test.info"
  time="2012-01-25T11:07:23.4869634Z"
  statusCode="500">

Well, I don have any idea of why we get this error. I see a lot of these in my elmah log. Any ideas how to fix and why this occurs .

asp.net-mvc
asked on Stack Overflow Jan 30, 2012 by pinki • edited Jul 30, 2012 by tereško

1 Answer

0

You do not have anything to fix - what this say is simple. The other point that view your page is close the connection before the full processing of the page - an in this case what's happens from your side is that you continue the page render and you get this throw.

if you have some pages with long time processing you may check time to time if the user is still connected using the

Response.IsClientConnected

and maybe stop the processing.

answered on Stack Overflow Jan 30, 2012 by Aristos

User contributions licensed under CC BY-SA 3.0