views:

324

answers:

2

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?

A: 

Try to enable tracing why you have a communication error. How to enable this: check this site: link text

pipelinecache
A: 

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

Meidan Alon
What was the change you did to fix this? Remove the call to Abort? Replace it with something else (Close)?
Roy
Indeed, client has to call Close (or its equivalent, depending on platform)
Meidan Alon