XPathMessageFilterElement Class

Represents a configuration element that is used in message logging. This class cannot be inherited.

Namespace:  System.ServiceModel.Configuration
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

public sealed class XPathMessageFilterElement : ConfigurationElement

An XPath filter is a query on an XML document defined by an XPath 1.0 expression.

XPath filters can be added to the messageLogging section to log specific messages at the transport and service levels. If no filters are defined, all messages are logged. Filters are applied only to the headers of the message. The body is ignored. Windows Communication Foundation (WCF) ignores the message body to improve performance. If you want to filter based on the content of the body, you can create a custom listener with a filter that does so.

When transport message logging is enabled (LogMessagesAtTransportLevel is true), only messages matching the filters are logged.

System.Object
  System.Configuration.ConfigurationElement
    System.ServiceModel.Configuration.XPathMessageFilterElement

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft