<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.
Schema Hierarchy
Syntax
<behaviors>
<serviceBehaviors>
</serviceBehaviors>
<endpointBehaviors>
</endpointBehaviors>
</behaviors>
Attributes and Elements
The following sections describe attributes, child elements, and parent elements.
Attributes
None
Child Elements
Element | Description |
---|---|
This configuration section represents all the behaviors defined for a specific endpoint. |
|
This configuration section represents all the behaviors defined for a specific service. |
Parent Elements
Element | Description |
---|---|
The root element of all Windows Communication Foundation (WCF) configuration elements. |
Remarks
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.
See Also
Reference
BehaviorsSection
EndpointBehaviorElementCollection
EndpointBehaviorElement
ServiceBehaviorElementCollection
ServiceBehaviorElement
Other Resources
Configuring and Extending the Runtime with Behaviors
Configuring Client Behaviors
Specifying Client Run-Time Behavior
Specifying Service Run-Time Behavior
Security Behaviors in WCF