Which configuration segment should you add to the <System.Diagnostics> element?

You are developing a Windows Communication Foundation (WCF) service.
The service configuration file has a <System.Diagnostics> element defined.
You need to ensure that all security audit information, trace logging, and message logging failures are recorded.
Which configuration segment should you add to the <System.Diagnostics> element?

You are developing a Windows Communication Foundation (WCF) service.
The service configuration file has a <System.Diagnostics> element defined.
You need to ensure that all security audit information, trace logging, and message logging failures are recorded.
Which configuration segment should you add to the <System.Diagnostics> element?

A.
<sources>
<source name=”System.ServiceModel” switchValue=”Information, ActivityTracing” propagateActivity=”true”>
<listeners>
<add name=”xml” />
</listeners>
</source>
<source name=”System.ServiceModel.MessageLogging” propagateActivity=”true”>
<listeners>
<add name=”text” />
</listeners>
</source>
</sources>

B.
<sources>
<source name=”System.ServiceModel” switchValue=”Information, ActivityTracing” propagateActivity=”true” />
<source name=”System.ServiceModel.MessageLogging” propagateActivity=”true” />
</sources>

C.
<sources>
<source name=”System.ServiceModel” switchValue=”Information, ActivityTracing” propagateActivity=”true”>
<listeners>
<add name=”xml” />
</listeners>
</source>
<source name=”System.ServiceModel.MessageLogging” propagateActivity=”true”>
<listeners>
<add name=”xml” />
</listeners>
</source>
</sources>
<sharedListeners>
<add name=”xml” type=”System.Diagnostics.XmlWriterTraceListener” initializeData=”& ” />
</sharedListeners>

D.
<sources>
<source name=”System.ServiceModel” switchValue=”Information, ActivityTracing” propagateActivity=”true” />
<source name=”System.ServiceModel.MessageLogging” propagateActivity=”true” />
</sources>
<sharedListeners>
<add name=”xml” type=”System.Diagnostics.XmlWriterTraceListener” initializeData=”& ” />
</sharedListeners>



Leave a Reply 1

Your email address will not be published. Required fields are marked *