Reputation: 50752
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?
Upvotes: 0
Views: 491
Reputation: 1039368
A better way would be to use an error handler by implementing the IErrorHandler interface.
Upvotes: 1