简体   繁体   中英

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(object sender, EventArgs args)
{
    //exception is thrwon in wcf service
}

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

更好的方法是通过实现IErrorHandler接口来使用错误处理程序

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM