none
WCF - Message Filtering RRS feed

  • Question

  • Dear .NET users

    I have a question about the WCF filtering in the Web.config

    Here is an example of the Web.config block

    <messageLogging logEntireMessage="true"
        logMalformedMessages="true" 
        logMessagesAtServiceLevel="true"
        logMessagesAtTransportLevel="true"
        maxMessagesToLog="420">
        <filters>
            <add nodeQuota="10" xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
                     /soap:Envelope/soap:Header
            </add>
         </filters>
    </messageLogging>

    My question is...

    Are all messageLogging attributes are required for filtering or can I use just  logMessagesAtTransportLevel?

    Thank you very much for your assistance

    Tuesday, December 17, 2013 6:57 PM

Answers

  • Hi,

    Yes, when transport message logging is enabled (logMessagesAtTransportLevel is true), then only messages matching the filters will be logged. And filters are applied only at the transport layer. Service level and malformed message logging are not affected by filters.

    For more information, please try to refer to:
    #messageLogging:
    http://msdn.microsoft.com/en-us/library/ms731308(v=vs.110).aspx .

    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, December 18, 2013 10:42 AM
    Moderator