Browsing All Posts filed under »WCF traces«

How to enable WCF traces programmatically?

November 21, 2010 by


Motivation Enabling WCF traces requires updating the app.config and restarting the application. Since production code usually does not run with the traces enabled, we open the traces only when we detect that something is wrong in the system and we need more information to detect the root cause. The problem is that restarting the application […]

Tips for working with WCF traces

November 10, 2010 by


Activating WCF traces Enabling WCF traces is done by adding the following section to the application app.config and restarting the application: <configuration> <system.diagnostics> <sources> <source name="System.ServiceModel" switchValue="Information, ActivityTracing" propagateActivity="true"> <listeners> <add name="traceListener" type="System.Diagnostics.XmlWriterTraceListener" initializeData= "c:\logs\client1.svclog" /> </listeners> </source> </sources> <trace autoflush="true" /> </system.diagnostics> </configuration> A few things to notice: The directory in the “initializeData” path […]