Share via


<behaviors>

この要素は、endpointBehaviorsserviceBehaviors という 2 つの子コレクションを定義します。各コレクションは、エンドポイントとサービスによって使用されるそれぞれの動作要素を定義します。各動作要素は、その一意の name 属性で識別されます。.NET Framework 4 以降では、バインディングおよび動作に名前を付ける必要はありません。既定の構成、および名前のないバインディングと動作の詳細については、「Simplified Configuration」および「Simplified Configuration for WCF Services」を参照してください。

スキーマの階層

<system.serviceModel>

構文

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

属性と要素

以降のセクションでは、属性、子要素、および親要素について説明します。

属性

なし

子要素

要素 説明

<endpointBehaviors>

この構成セクションは、特定のエンドポイントに対して定義されたすべての動作を表します。

<serviceBehaviors>

この構成セクションは、特定のサービスに対して定義されたすべての動作を表します。

親要素

要素 説明

<system.serviceModel>

すべての Windows Communication Foundation (WCF) 構成要素のルート要素です。

解説

<remove> 要素を使用して、コレクションから特定の動作を削除できます。これを行うには、<remove> 要素の name 属性に、削除する動作の名前を指定します。また、<clear> 要素を使用してコレクションの内容をすべて消去し、動作コレクションの初期値を確実に空にすることもできます。

参照

リファレンス

BehaviorsSection
EndpointBehaviorElementCollection
EndpointBehaviorElement
ServiceBehaviorElementCollection
ServiceBehaviorElement

その他のリソース

Configuring and Extending the Runtime with Behaviors
Configuring Client Behaviors
Specifying Client Run-Time Behavior
Specifying Service Run-Time Behavior
Security Behaviors in WCF