title: System.Runtime.InteropServices.COMException Incorrect function. (Exception from HRESULT: 0x80070001)
body: <p>I have an Asynchronus IHttpHandler in ASP.net and I am seeing this exception error in my ELMAH capture.</p>
  
  <p>Windows Server 2008 R2 Web Edition
  IIS 7.5
  ASP.NET
  .NET 4.0 Runtime
  Running HTTP on the site.</p>
  
  <p>Could anyone shed some light on this one? Google lists some results from 2008 or so regarding a bug in .NET 2.0 about HTTP disconnecting during the Read() function of the request body.</p>
  
  <h2>Stack Trace</h2>
  
  <pre><code>System.Web.HttpException (0x80004005): An error occurred while communicating with the remote host. The error code is 0x80070001. ---&gt; System.Runtime.InteropServices.COMException (0x80070001): Incorrect function. (Exception from HRESULT: 0x80070001)
  
  Server stack trace: 
      at System.Web.Hosting.IIS7WorkerRequest.RaiseCommunicationError(Int32 result, Boolean throwOnDisconnect)
      at System.Web.Hosting.IIS7WorkerRequest.ReadEntityCoreSync(Byte[] buffer, Int32 offset, Int32 size)
      at System.Web.HttpRequest.GetEntireRawContent()
      at System.Web.HttpRequest.get_InputStream()
      at MyHandler.ProcessRequest(HttpContext context)
      at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]&amp; outArgs)
      at System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(RuntimeMethodHandle md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]&amp; outArgs)
      at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)
  </code></pre>