[英]Finding the Web Method responsible for WCF Communication Exception
我正在嘗試查找負責引發間歇性System.ServiceModel.CommunicationException
異常的Web方法(Web應用程序有數百種方法)的名稱。
我有一個可以捕獲異常的錯誤處理程序( IErrorHandler
),但是異常信息並未將我指向異常的來源。
有什么方法可以確定哪個Web方法導致異常?
唯一的堆棧跟蹤信息如下:
System.ServiceModel.CommunicationException:從管道讀取錯誤:無法識別的錯誤109(0x6d)。 ---> System.IO.PipeException:從管道讀取錯誤:無法識別的錯誤109(0x6d)。
在System.ServiceModel.Channels.PipeConnection.OnAsyncReadComplete(Boolean haveResult,Int32錯誤,Int32 numBytes)
---內部異常堆棧跟蹤的結尾---
在System.Runtime.AsyncResult.End [TAsyncResult](IAsyncResult結果)處
在System.ServiceModel.Channels.TransportDuplexSessionChannel.TryReceiveAsyncResult.End(IAsyncResult結果,消息和消息)
在System.ServiceModel.Dispatcher.DuplexChannelBinder.EndTryReceive(IAsyncResult結果,RequestContext&requestContext)
在System.ServiceModel.Dispatcher.ErrorHandlingReceiver.EndTryReceive(IAsyncResult結果,RequestContext&requestContext)
謝謝
在調試時,Visual Studio 2010可能會捕獲異常。 您可以捕獲任何一組異常或全部。 也可以在執行引發異常的操作之前啟用捕獲功能。
假設您正在使用Visual Studio 2010:
Common language runtime exceptions
部分。 System.ServiceModel
,也單擊此打開。 我還建議,如果可能的話,向可能導致此錯誤的方法中添加某種日志記錄。 這樣,更容易查明問題的位置。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.