What is a service level message and transport level message?

 Posted by articlesMaint on 9/15/2009 | Category: WCF Interview questions | Views: 5816


You can log WCF message at two levels one is service level and the other is transport level. Service level:-In this the messages are logged as they enter the user code or leave the user code. Transport level: - In this the messages are logged as they are ready to be encoded / decoded. All transport level, infrastructure messages and also reliable messaging is logged. You specify the message levels in the diagnostics node as shown in the below code snippet.


<system.serviceModel> 

<diagnostics>
<messageLogging
logEntireMessage="true"
logMalformedMessages="false"
logMessagesAtServiceLevel="false"
logMessagesAtTransportLevel="true"
maxMessagesToLog="3000"
maxSizeOfMessageToLog="10000"/>
</diagnostics>
</system.serviceModel>

‘Messagelogging’ also has other attributes , below is the short description about the same.

 

Attribute

Description

logEntireMessage

Should the entire message be logged on only the header.

logMalformedMessages

Should malformed messages be logged.

logMessagesAtServiceLevel

Should service-level messages be logged.

logMessagesAtTransportLevel

Should transport level messages be logged.

maxMessageToLog

Number indicating how many messages should be logged.  

maxSizeOfMessageToLog

The default value is 256Kb. Max size of the message log.

 


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response