Debugging WCF – Traces and Message Logs

There has been enough posts on this topic. But this topic cannot be over emphasized. The best way to debug any WCF issue is to get a complete Message log and trace. We write tons of information to the trace that there is very little (if any) issues that traces cannot solve. Below is a config to generate Message logs and Traces in the Verbose level. The config will create a file e2eTraceTest.e2e in the directory where the config lives.

                         <messageLogging maxMessagesToLog="30000" 
                         <source name="System.ServiceModel" 
                                 switchValue="Verbose, ActivityTracing" 
                                 propagateActivity="true" >
                                         <add name="xml" />
                         <source name="System.ServiceModel.MessageLogging" 
                                         <add name="xml" />
                         <add name="xml" 
                              initializeData="e2eTraceTest.e2e" />
                 <trace autoflush="true" />

Skip to main content