在WCF服务抛出异常抛出一个
问题描述:
的CommunicationException每当
我扔在我服务的例外,另一个例外是后马上抛出:在WCF服务抛出异常抛出一个
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;
}
任何想法为什么?
答
我会仔细检查问题是否真的存在于处理程序中。我做了完全相同的事情。总体而言,IErrorHandler是一种有效的方法。 – Alex 2009-12-06 23:23:49