Asp.net

System.Runtime.InteropServices.COMException 函式不正確。(來自 HRESULT 的異常:0x80070001)

  • October 19, 2011

我在 ASP.net 中有一個非同步 IHttpHandler,我在我的 ELMAH 擷取中看到了這個異常錯誤。

Windows Server 2008 R2 Web Edition IIS 7.5 ASP.NET .NET 4.0 Runtime 在站點上執行 HTTP。

任何人都可以對此有所了解嗎?Google 列出了 2008 年左右關於 .NET 2.0 中關於請求正文的 Read() 函式期間 HTTP 斷開連接的錯誤的一些結果。

堆棧跟踪

System.Web.HttpException (0x80004005): An error occurred while communicating with the remote host. The error code is 0x80070001. ---> 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[]& outArgs)
   at System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(RuntimeMethodHandle md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
   at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)

這是 IIS7 (webengine.dll) 的底層非託管層報告的錯誤。經過一番Google搜尋後,最相關的執行緒似乎表明這是由於網卡驅動程序配置(TCP解除安裝)導致的錯誤。

看到這個:與遠端主機通信時發生錯誤。錯誤程式碼為 0x80070001

引用自:https://stackoverflow.com/questions/7825127