Modify TraceListeners programmatically

Posted by PeterM under WCF on 3/8/2011 | Points: 10 | Views : 1995 | Status : [Member] | Replies : 0
With WCF TraceListeners is it possible to adjust ot tweak some values set in system.diagnostics section.

As one normally has access to the actual hosted service configuration settings, its only the settings for a deployed client application that consumes a wcf service that I am interested in.

One does not want the client to edit the application.exe.config file as the risk of mistakes is very high and can make problem resolution even more difficicult.

If one deploys the application with

<source name="System.ServiceModel.MessageLogging"

How can one adjust the switchValue to the equivalent of
programmatically by the user changing some UI control (combobox) in the application.

I would understand that one needs to do this prior to instantiating an instance of one's wcf service proxy.

If this is not possible what is the best alternative?


(No response found.)

Login to post response