description | title | ms.date | ms.assetid |
---|---|---|---|
Learn more about: <behaviors> |
<behaviors> |
03/30/2017 |
0e5da4e6-1aa5-466c-924e-f10efee57f0b |
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.
<configuration>
<system.serviceModel>
<behaviors>
<behaviors>
<serviceBehaviors>
</serviceBehaviors>
<endpointBehaviors>
</endpointBehaviors>
</behaviors>
The following sections describe attributes, child elements, and parent elements.
None
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. |
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.
- xref:System.ServiceModel.Configuration.BehaviorsSection
- xref:System.ServiceModel.Configuration.EndpointBehaviorElementCollection
- xref:System.ServiceModel.Configuration.EndpointBehaviorElement
- xref:System.ServiceModel.Configuration.ServiceBehaviorElementCollection
- xref:System.ServiceModel.Configuration.ServiceBehaviorElement
- Configuring and Extending the Runtime with Behaviors
- Configuring Client Behaviors
- Specifying Client Run-Time Behavior
- Specifying Service Run-Time Behavior
- Security Behaviors