Throwing an exception in a WCF service throws a CommunicationException

2.3k views Asked by At

Whenever I throw an exception in my service, another exception is thrown right after it:

System.ServiceModel.CommunicationException: There was an error reading from the
pipe: Unrecognized error 109 (0x6d). ---> System.IO.PipeException: There was an
error reading from the pipe: Unrecognized error 109 (0x6d).

I'm implementing IErrorHandler so I can log (using log4net) all unhandled exceptions:

    bool IErrorHandler.HandleError(Exception error)
    {
        if (!(error is FaultException))
        {
            logger.Fatal("Unhandled Exception", error);
        }
        return false;
    }

Any idea why is that?

1

There are 1 answers

3
Meidan Alon On BEST ANSWER

Problem was client calling Abort on the channel whenever I returned a fault exception.