Probably trivial question.. I want to implement my own error handler to log errors and monitor what's going on. At this point I don't want to provide my own faults to the clients. I want it to be transparent - just like default WCF behavior. How should I implement ProvideFault
to achieve this?
namespace IDATT.Web.Services
{
using System;
using System.ServiceModel.Channels;
using System.ServiceModel.Dispatcher;
public class MyServiceErrorHandler : IErrorHandler
{
public void ProvideFault(Exception error, MessageVersion version, ref Message fault)
{
// ????
}
public bool HandleError(Exception error)
{
return true;
}
}
}