Using built-in tracing and message logging

As WCF developers, we will often encounter some general exceptions or errors (such as “underlying connection closed …..”, “communication object is in faulted state”, “security exception…”) from which we cannot quite determine what is really wrong. Or, in some cases, we might want to have a look at how the WCF runtime is transforming the service operation calls into data messages under the hood. Well, WCF provides a built-in event-tracing and message-logging functionality that can help simplify such general error troubleshooting.

In this recipe, we will demonstrate how we can leverage the tracing and message-logging feature in WCF service development.

How to do it...

You can enable WCF tracing and message ...

Get Microsoft Windows Communication Foundation 4.0 Cookbook for Developing SOA Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.