<behaviors>

This element defines two child collections named endpointBehaviors and serviceBehaviors. Each collection defines behavior elements consumed by endpoints and services respectively. Each behavior element is identified by its unique name attribute. Starting with .NET Framework 4, bindings and behaviors are not required to have a name. For more information about default configuration and nameless bindings and behaviors, see Simplified Configuration and Simplified Configuration for WCF Services.


<behaviors>
   <serviceBehaviors>
   </serviceBehaviors>
   <endpointBehaviors>
   </endpointBehaviors>
</behaviors>

The following sections describe attributes, child elements, and parent elements.

Attributes

None

Child Elements

Element Description

<endpointBehaviors>

This configuration section represents all the behaviors defined for a specific endpoint.

<serviceBehaviors>

This configuration section represents all the behaviors defined for a specific service.

Parent Elements

Element Description

<system.serviceModel>

The root element of all Windows Communication Foundation (WCF) configuration elements.

You can use the <remove> element to remove a particular behavior from the collection. To do so, simply supply the name of the behavior to remove in the name attribute of the <remove> element. You can also use the <clear> element to insure that a behavior collection starts empty by clearing out all the content of the collection.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft