Configuring Diagnostics
When you work with WCF, it is likely you will run into issues you don't understand completely. To investigate these issues, you will need to know what messages flow through your application and to trace them. Luckily, WCF provides integrated support for logging messages and tracing. You can configure diagnostics by using the Microsoft Service Configuration Editor or by manipulating the application configuration manually. Tracing works with listeners, similar to the Microsoft .NET Framework 2.0. Refer to Listing 3-20 for an example.
Example. Application Configuration with Tracing Enabled
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.diagnostics>
<sources>
<source name="System.ServiceModel.MessageLogging" ... |
Get Pro WCF: Practical Microsoft SOA Implementation 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.