开发者

How to catch exact exception in wcf service

开发者 https://www.devze.com 2023-02-12 05:21 出处:网络
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)

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

精彩评论

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