开发者

How to catch exact exception in wcf service

I want to catch all Faults in WCF service, and found the way to do that

OperationContext.Current.Channel.Faulted += delegate(obj开发者_开发技巧ect sender, EventArgs args)
{
    //exception is thrwon in wcf service
}

the question is how to know the exact exception in Fault event?


A better way would be to use an error handler by implementing the IErrorHandler interface.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜