Deperplexing WCF errors pt. 2 – IsOneWay swallowing exceptions

The first step in understanding WCF error messages is making sure you actually get them.

You can have an OperationContract defined with the IsOneWay parameter set to True, thus optimizing it by not requiring a reply message.
Since faults and exceptions are represented as replies to the message sent, however, setting IsOneWay to true will cause WCF to simply swallow the exception and not report it – as far as the framework is concerned the message was sent successfully and that’s it.

If you want to use the IsOneWay optimization, it’s best to save it for later parts of development, after the basic debugging work is done.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.