在WCF服务中抛出异常会抛出CommunicationException

时间:2009-12-06 16:54:13

标签: wcf communicationexception

每当我在我的服务中抛出异常时,就会抛出另一个异常:

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).

我正在实现IErrorHandler,所以我可以记录(使用log4net)所有未处理的异常:

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

知道为什么会这样吗?

1 个答案:

答案 0 :(得分:1)

问题是客户端在我返回故障异常时在通道上调用Abort。