开发者

Throwing an exception in a WCF service throws a CommunicationException

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

System.ServiceModel.CommunicationException: Ther开发者_如何学Pythone 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?


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

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜