1
Vote

HttpException if client disconnects before transfer starts

description

This is the exception generated when the client disconnected:
System.Web.HttpException (0x80004005): An error occurred while communicating with the remote host. The error code is 0x80070057. ---> System.ArgumentException: Value does not fall within the expected range.
   at System.Web.Hosting.IIS7WorkerRequest.RaiseCommunicationError(Int32 result, Boolean throwOnDisconnect)
   at System.Web.Hosting.IIS7WorkerRequest.ExplicitFlush()
   at System.Web.HttpResponse.Flush(Boolean finalFlush, Boolean async)
   at VikingErik.Mvc.ResumingActionResults.ResumingActionResultBase.WriteBinaryData(ControllerContext context, Stream fileContent, Int64 startIndex, Int64 endIndex)
   at VikingErik.Mvc.ResumingActionResults.ResumingActionResultBase.WriteFullContent(ControllerContext context, Stream fileContent)
   at VikingErik.Mvc.ResumingActionResults.ResumingActionResultBase.ExecuteResultBody(ControllerContext context, ResumingRequest resumingRequest)
   at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19()
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation)
   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.MvcHandler.<>c__DisplayClass6.<>c__DisplayClassb.<BeginProcessRequest>b__5()
   at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass1.<MakeVoidDelegate>b__0()
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

comments