[英]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.