现在花了很长时间查看远程主机关闭了连接。错误代码是0x80070057问题。 以下是完整的异常详情:
<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.

at System.Web.Hosting.IIS7WorkerRequest.RaiseCommunicationError(Int32 result, Boolean throwOnDisconnect)

at System.Web.Hosting.IIS7WorkerRequest.ExplicitFlush()
 at System.Web.HttpResponse.Flush(Boolean finalFlush)

at System.Web.HttpResponse.Flush()

at System.Web.HttpResponseWrapper.Flush()

at test.Core.Utils.BufferedStreamCopy.Copy(Stream source, Stream output, Action flushDelegate, Func`1 streamPredicate)

at test.Core.Utils.BufferedStreamCopy.CopyToResponse(Stream source, HttpResponseBase response)

at test.Core.Utils.BufferedStreamCopy.Proxy(HttpWebResponse incoming, HttpResponseBase outgoing)

at test.Util.Web.HttpDirectResponse.ProxyToResponse(HttpResponseBase clientResponse)

at test.Core.Mvc.Extensions.ActionResults.ProxyResult.ExecuteResult(ControllerContext context)

at System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult)

at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass11.<InvokeActionResultWithFilters>b__e()

at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation)

at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass11.<>c__DisplayClass13.<InvokeActionResultWithFilters>b__10()

at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult)

at System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName)

at System.Web.Mvc.Controller.ExecuteCore()
 at System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext)

at System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext)

at System.Web.Mvc.MvcHandler.ProcessRequest(HttpContextBase httpContext)

at System.Web.Mvc.MvcHandler.ProcessRequest(HttpContext httpContext)

at System.Web.Mvc.MvcHandler.System.Web.IHttpHandler.ProcessRequest(HttpContext httpContext)

at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)"
user="mw@test.info"
time="2012-01-25T11:07:23.4869634Z"
statusCode="500">
好吧,我不知道为什么会收到这个错误。我在elmah日志中看到了很多这些。 任何想法如何解决以及为什么会发生这种情况。
答案 0 :(得分:0)
你没有什么可修理的 - 这说法很简单。查看页面的另一点是在完全处理页面之前关闭连接 - 在这种情况下,从你这边发生的事情是你继续页面渲染并且你得到了这个。
如果您有一些长时间处理的页面,如果用户仍然使用
连接,您可以不时检查Response.IsClientConnected
并且可能会停止处理。