For tracing using WCF services one adds a system.diagnostics section usually
by using the WCF configuration editor during development.
I would like to be able to adjust settings like this
<configuration>
<system.diagnostics>
<sources>
<source name="System.ServiceModel.MessageLogging"
switchValue="None,ActivityTracing">
. . .
to
<configuration>
<system.diagnostics>
<sources>
<source name="System.ServiceModel.MessageLogging"
switchValue="Verbose,ActivityTracing">
. . .
I need to be able to change or edit settings after deployment.
. I don't want the client to edit the application.exe.config file
directly (I could not think of anything riskier).
. One does not normally have access to the clients
workstation/server to edit this oneself on behalf of the end user.
. The ConfgurationManager does not appear to have the capabilities
of modifying the systems.diagnostics section.
. One can create Tracelistener programmatically, but how does one
wire this into the wcf client proxy so it generates the trace information?
. Is it even possible to change the switchvalue programmatically?
I have spent hours on this, googling, msdn etc. All I am getting is
extremely frustrated.
I cannot be the only one to need to adjust these settings. Even making
changes and then having the end user to stop and restart the application for
it to take effect would be ok.
A while ago someone suggested using SourceSwitch
http://msdn.microsoft.com/en-us/library/w65awck1.aspx but I don't see how
this helps. There does not appear to be sufficient information on how to use
this yet alone how to use it to alter the app.config settings
programmatically after the application has been started.
If it's not possible, I would like to know that, so I can stop belting my
head against a wall trying to accomplish the impossible.
Regards Peter Maddin
Applications Development Officer
PathWest Laboratory Medicine WA
Phone : +618 6396 4285
Mobile: 0414 240 307
E-Mail : [email protected]; [email protected]
The contents of this e-mail transmission outside of the WAGHS network are
intended solely for the named recipient's), may be confidential, and may be
privileged or otherwise protected from disclosure in the public interest.
The use, reproduction, disclosure or distribution of the contents of this
e-mail transmission by any person other than the named recipient(s) is
prohibited. If you are not a named recipient please notify the sender
immediately.