2015-10-15 59 views
1

有一個奇怪的例外,在我MVC 6 (beta 7)項目的日誌:WebListenerException:指定的網絡名稱不再可用

01:29:55.8657 Error Flush 
System.IO.IOException ---> Microsoft.Net.Http.Server.WebListenerException: The specified network name is no longer available 
    --- End of inner exception stack trace --- 
01:29:55.8901 Error ProcessRequestAsync 
System.IO.IOException ---> Microsoft.Net.Http.Server.WebListenerException: The specified network name is no longer available 
    --- End of inner exception stack trace --- 
    at Microsoft.Net.Http.Server.ResponseStream.FlushInternal(Boolean endOfRequest) 
    at Microsoft.Net.Http.Server.ResponseStream.Dispose(Boolean disposing) 
    at System.IO.Stream.Close() 
    at Microsoft.Net.Http.Server.Response.Dispose() 
    at Microsoft.Net.Http.Server.RequestContext.Dispose() 
    at Microsoft.AspNet.Server.WebListener.MessagePump.<ProcessRequestAsync>d__23.MoveNext() 

我發現這樣的錯誤是在MVC 6外(the fist linkthe second link

但在我的情況下,例外的來源是Microsoft.Net.Http.Server.ResponseStream.FlushInternal方法。

錯誤不會中斷應用程序。它發生在一些查詢後(我沒有注意到一個模式),並且很少發生。

爲什麼這個錯誤在我的日誌中定期發生?

我可以採取任何措施避免錯誤嗎?

謝謝!

回答

1

這聽起來像客戶端在發送響應之前斷開連接。沒有寫入套接字就很難檢測到。我們有一個(專用)工作項目來減弱日誌中的這些錯誤消息。