We have started getting numerous 'The remote host closed the connection. The error code is 0x800703E3' in our application exception log over the past couple of days and in researching this error our Stack Trace is returning this:
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 System.IO.Stream.<BeginWriteInternal>b__11(Object param0)
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.IO.Stream.EndWrite(IAsyncResult asyncResult)
at Microsoft.Owin.Host.SystemWeb.CallStreams.OutputStream.EndWrite(IAsyncResult asyncResult)
at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Owin.HttpMessageHandlerAdapter.<SendResponseContentAsync>d__20.MoveNext()
I've found in various blogs and posts that it recommends using response.end instead of response.flush but the application developers are using IHttpRequest for all controllers which handles the response object internally.
So my question is if the IHttpRequest is handling all Response object responsibilities is there any way that we handle this gracefully so that we don't get all of these exceptions being logged?
TIA, Bill
User contributions licensed under CC BY-SA 3.0