共用方式為


<compositeDuplex>

定義繫結項目,這是當用戶端必須公開 (Expose) 服務的端點才能將訊息傳回用戶端時所使用的項目。

結構描述階層

<system.serviceModel>
  <bindings>
    <customBinding>
      <binding>
        <compositeDuplex>

語法

<compositeDuplex clientBaseAddress="URI" />

屬性和元素

下列各節說明屬性、子項目和父項目。

屬性

屬性 描述

clientBaseAddress

URI,設定雙工模式中返回通道的位址。服務會使用這個位址與用戶端連絡並建立連線。

如果未設定這個屬性,則產生預設位址 “full qualified name+default port\TemporaryIndigoAddress\guid”。預設為 null

項目子系

父項目

項目 描述

<binding>

定義自訂繫結的所有繫結功能。

備註

這個組態項目是和本身不允許雙工通訊的傳輸一起使用,例如 HTTP。相反地,TCP 本身就允許雙工通訊,因此不需要使用這個繫結項目也可讓服務將訊息傳回用戶端。

用戶端必須公開位址,才能讓服務接觸並建立連接。這個用戶端位址是由 clientBaseAddress 屬性提供。請注意,如果使用者未明確設定此屬性,則 Windows Communication Foundation (WCF) 會自動產生 ClientBaseAddress。

範例

<compositeDuplex clientBaseAddress="https://www.contoso.com" />

另請參閱

參考

<customBinding>
CompositeDuplexElement
CompositeDuplexBindingElement
CustomBinding

其他資源

Windows Communication Foundation Bindings
Extending Bindings
Custom Bindings