Export (0) Print
Expand All

FilterElement.FilterData Property

Gets or sets the filter data of this configuration element.

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

[ConfigurationPropertyAttribute("filterData", DefaultValue = null, Options = ConfigurationPropertyOptions.None)]
public string FilterData { get; set; }

Property Value

Type: System.String
The filter data of this element.

The following table describes the meaning of FilterData based on the value of FilterType.

Filter Type


Filter Data Meaning

Example Filter


Uses the ActionMessageFilter that comes with WCF.

The Action to filter upon.

<filter name="action1" filterType="Action" filterData="http://ACTION" />


Uses the EndpointAddressMessageFilter that comes with WCF with ignore host name == true.

The address to filter upon (in the To header).

<filter name="address1" filterType="Address" filterData="http://host/vdir/s.svc/b" />


Uses the PrefixEndpointAddressMessageFilter that comes with WCF with ignore host name == true.

The address to filter upon using longest prefix matching.

<filter name="prefix1" filterType="AddressPrefix" filterData="http://host" />


A custom AndMessageFilter that always evaluates both conditions before returning.

filterData is not used, instead filter1 and filter2 have the names of the corresponding messages filters (also in the table), which should be ANDed together.

<filter name="and1" filterType="And" filter1="address1" filter2="action1" />


A user-defined type that extends MessageFilter and has a constructor taking a string.

customType attribute is the fully-qualified type name of the class to create, filterData is the string to pass to the constructor when creating the filter.

<filter name="custom1" filterType="Custom" customType="CustomAssembly.CustomMsgFilter, CustomAssembly" filterData="Custom Data" />


A custom message filter for use solely in the Routing Service, which filters messages based on the name of the service endpoint.

The name of the service endpoint, for example: “serviceEndpoint1”.  This should be one of the endpoints exposed on the Routing Service.

<filter name="stock1" filterType="Endpoint" filterData="SvcEndpoint" />


Uses the MatchAllMessageFilter that comes with WCF.


<filter name="matchAll1" filterType="MatchAll" />


Uses the XPathMessageFilter that comes with WCF.

The XPath query to use when matching messages.

<filter name="XPath1" filterType="XPath" filterData="//ns:element" />

.NET Framework

Supported in: 4

.NET Framework Client Profile

Supported in: 4

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

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

Community Additions

© 2014 Microsoft