Which configuration segment should you use?

You are developing a Windows Communication Foundation (WCF) service.
You must record all available information for the first 1,000 messages processed, even if they are malformed.
You need to configure the message logging section of the configuration file. Which configuration segment should you use?

You are developing a Windows Communication Foundation (WCF) service.
You must record all available information for the first 1,000 messages processed, even if they are malformed.
You need to configure the message logging section of the configuration file. Which configuration segment should you use?

A.
<messageLogging logEntireMessage=”true”
logMalformedMessages=”true”
logMessagesAtServiceLevel=”true”
logMessagesAtTransportLevel=”true”
maxMessagesToLog=”1000″/>

B.
<messageLogging logMessagesAtServiceLevel=”true”
logMessagesAtTransportLevel=”true”
maxMessagesToLog=”1000″/>

C.
<messageLogging logEntireMessage=”false”
logMessagesAtServiceLevel=”true”
logMessagesAtTransportLevel=”false”
maxMessagesToLog=”1000″/>

D.
<messageLogging logMalformedMessages=”true”
logMessagesAtServiceLevel=”true”
logMessagesAtTransportLevel=”false”
maxMessagesToLog=”1000″/>

Explanation:
Configuring Message Logging
(http://msdn.microsoft.com/en-us/library/ms730064.aspx)

MessageLoggingElement properties:
LogEntireMessage Gets or sets a value that specifies whether the entire message (message header and body) is logged.
logMalformedMessages
LogMessagesAtServiceLevel Gets or sets a value that specifies whether messages are traced at the service level (before encryption and transport-related transforms).
LogMessagesAtTransportLevel Gets or sets a value that specifies whether messages are traced at the transport level.



Leave a Reply 1

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