A Windows Communication Foundation (WCF) application exposes a service as a SOAP endpoint for consumption by cross-platform clients.
During integration testing, you find that one of the clients is not generating the correct messages to the WCF application.
In order to debug the issue and fix the communication, you need to configure the service to log messages received from the client.
What should you do?
A.
Set an etwTracking behavior on the service and configure a listener for the System.ServiceModel trace source.
B.
Set an etwTracking behavior on the service and configure a listener for the System.ServiceModel.MessageLogging trace source.
C.
Enable messageLogging in the System.ServiceModel diagnostics element configuration and
configure a listener for the System.ServiceModel.MessageLogging trace source.
D.
Enable messageLogging in the System.ServiceModel diagnostics element configuration and
configure a listener for the System.ServiceModel trace source.
Explanation:
Configuring Message Logging
(http://msdn.microsoft.com/en-us/library/ms730064.aspx)Example:
<system.diagnostics>
<sources>
<source name=”System.ServiceModel.MessageLogging”>
<listeners>
<add name=”messages”
type=”System.Diagnostics.XmlWriterTraceListener”
initializeData=”c:\logs\messages.svclog” />
</listeners>
</source>
</sources>
</system.diagnostics><system.serviceModel>
<diagnostics>
<messageLogging
logEntireMessage=”true”
logMalformedMessages=”false”
logMessagesAtServiceLevel=”true”
logMessagesAtTransportLevel=”false”
maxMessagesToLog=”3000″
maxSizeOfMessageToLog=”2000″/>
</diagnostics>
</system.serviceModel>
C