<endpointBehaviors> 的 <behavior>

behavior 元素包含终结点行为的设置集合。每个行为都按其 name 进行索引。终结点可以通过此名称链接到每个行为。

<system.serviceModel>
  <behaviors>
    <endpointBehaviors>
      <endpointBehaviors> 的 <behavior>

<system.ServiceModel>
  <behaviors>
    <endpointBehaviors>
       <behavior name="String" />
    </endpointBehaviors>
  </behaviors>
</system.ServiceModel>

属性和元素

属性

属性 说明

name

一个包含行为的配置名称的唯一字符串。此值是用户定义的一个字符串,该字符串必须是唯一的,因为它将充当元素的标识字符串。

子元素

元素 说明

<clientCredentials>

指定用于向服务验证客户端身份的凭据。

<callbackDebug>

指定 Windows Communication Foundation (WCF) 回调对象的服务调试。

<callbackTimeouts>

指定客户端回调的超时。

<clientVia>

指定消息应采用的路由。

dataContractSerializer

包含 DataContractSerializer 的配置数据。

<enableWebScript>

启用终结点行为,此行为使得可以使用 ASP.NET AJAX 网页中的服务。此行为只应该与 <webHttpBinding> 标准绑定或 <webMessageEncoding> 绑定元素一起使用。

<synchronousReceive> 元素

指定服务或客户端应用程序中用于接收消息的运行时行为。它不具有任何属性或子元素。

<transactedBatching>

指定接收操作是否支持事务批处理。

<<webHttp>>

通过配置指定终结点上的 WebHttpBehavior。此行为与 <webHttpBinding> 标准绑定结合使用时,将为 WCF 服务启用 Web 编程模型。

父元素

元素 说明

<endpointBehaviors>

终结点行为元素的集合。