共用方式為


系統提供的互通性繫結所支援的 Web 服務通訊協定

Windows Communication Foundation (WCF) 已建置成可與支援一組規格 (即所謂的 Web 服務規格) 的 Web 服務相互操作。為了簡化服務組態以獲得互通性最佳做法,WCF 引進三種互通的系統提供之繫結:System.ServiceModel.BasicHttpBindingSystem.ServiceModel.WSHttpBindingSystem.ServiceModel.WSDualHttpBinding。為了與美國先進結構化資訊標準組織 (OASIS) 標準互通,WCF 包含一種互通的系統提供之繫結:System.ServiceModel.WS2007HttpBinding。為了發行中繼資料,WCF 包括兩種互通的系統提供之繫結:<mexHttpBinding><mexHttpsBinding>。本主題列出系統提供之繫結支援的規格。

basicHttpBinding、wsHttpBinding、ws2007HttpBinding 和 wsDualHttpBinding 繫結支援的 Web 服務通訊協定

所有繫結

basicHttpBindingwsHttpBindingws2007HttpBinding 繫結支援以下通訊協定。

ms730294.note(zh-tw,VS.100).gif注意:
如需用於發行中繼資料之繫結的詳細資訊,請參閱本主題中稍後的「系統提供之中繼資料繫結」一節。

分類 通訊協定 規格和用法

傳輸

HTTP 1.1

HTTP 1.1

BasicHttpBindingWSHttpBindingWS2007HttpBinding 使用 HTTP 和 HTTPS 傳輸。

訊息

MTOM

MTOM

basicHttpBindingwsHttpBindingws2007HttpBinding 支援訊息傳輸最佳化機制 (MTOM)。預設不使用。若要使用 MTOM,請將 messageEncoding 屬性設為 "Mtom"

範例:

<wsHttpBinding>
<binding messageEncoding="Mtom"/>
</wsHttpBinding>

中繼資料

WSDL 1.1

WSDL 1.1

WCF 使用 Web 服務描述語言 (WSDL) 來描述服務。

中繼資料

WS-Policy

WS-Policy

WCF 將 WS-Policy 規格與定義域特定的判斷提示一起使用,以描述服務需求和功能。

中繼資料

WS-Policy 1.5

WS-Policy 1.5

WCF 將 WS-Policy 規格與定義域特定的判斷提示一起使用,以描述服務需求和功能。

中繼資料

WS-PolicyAttachment

WS-PolicyAttachment

WCF 實作 WS-PolicyAttachment 以附加 Web 服務描述語言 (WSDL) 中各種範圍的原則運算式。

中繼資料

WS-MetadataExchange

WS-MetadataExchange

WCF 實作 WS-MetadataExchange 以擷取 XML 結構描述、WSDL 和 WS-Policy。

basicHttpBinding

分類 通訊協定 規格和用法

訊息

SOAP 1.1

SOAP 1.1

根據 Basic Profile 1.1,basicHttpBinding 項目實作 SOAP 1.1 訊息通訊協定。

安全性

WSS SOAP 訊息安全性 1.0

WSS SOAP 訊息安全性 1.0

根據 Basic Security Profile,basicHttpBinding 項目實作 Web 服務安全性 (WSS) SOAP 訊息安全性 1.0 規格,以用於使用者名稱/密碼和 X.509 型的安全性。

<basicHttpBinding>
<binding name="Binding1">
<security mode="TransportWithMessageCredential | 
                   "Message" .../>
</binding>
</basicHttpBinding>

安全性

WSS SOAP 訊息安全性 UsernameToken 設定檔 1.0

WSS SOAP 訊息安全性 UsernameToken 設定檔 1.0

<basicHttpBinding>
<binding name="Binding1">
<security mode="TransportWithMessageCredential">
<transport clientCredentialType="Basic"/>
</security>
</basicHttpBinding>

安全性

WSS SOAP 訊息安全性 X.509 憑證權杖設定檔 1.0

WSS SOAP 訊息安全性 X.509 憑證權杖設定檔 1.0

<basicHttpBinding>
  <security mode="Message">
<message clientCredentialType="Certificate"/>
</security>
</basicHttpBinding>

wsHttpBinding、ws2007HttpBinding 和 wsDualHttpBinding

分類 通訊協定 規格和用法

訊息

SOAP 1.2

Primer

訊息架構

附加 (包括 HTTP 繫結)

訊息

WS-Addressing 2005/08

Web 服務定址 1.0 - Core

Web 服務定址 1.0 - SOAP

wsHttpBindingws2007HttpBindingwsDualHttpBinding 會實作全球資訊網協會 (W3C) WS-Addressing 建議,以啟用非同步訊息、訊息相互關聯和傳輸中性的定址機制。

訊息

WS-Addressing 1.0 - 中繼資料

WS-Addressing 1.0 中繼資料 這項通訊協定的支援是在 ServiceMetadata 行為中設定原則版本 (將 policyversion 設定為 1.2 (預設值)) 來啟用。WSDL 描述符合 WS-Addressing WSDL (將 policyversion 設定為 1.5),而且 WSDL 描述符合 WS-Addressing 中繼資料。

安全性

WSS SOAP 訊息安全性 1.0

WSS SOAP 訊息安全性 1.0

securityMode 屬性設為 "wsSecurityOverHttp" (預設值) 且使用 wsSecurity 子項目設定參數時使用。

<wsHttpBinding>
  <binding name="myBinding">
     <security mode="Message" .../>
  </binding>
</wsHttpBinding>

安全性

WSS SOAP 訊息安全性 UsernameToken 設定檔 1.1

WSS SOAP 訊息安全性 UsernameToken 設定檔 1.0

wsSecurity 項目的 authenticationMode 屬性設為 "Username" 時使用。

<wsHttpBinding>
  <binding name="MyBinding">
    <security mode="Message>
      <message   
       clientCredentialType="UserName
       negotiateServiceCredential="false"
       establishSecurityContext="false"/>
    </security>
</binding>
</wsHttpBinding>

安全性

WSS SOAP 訊息安全性 X.509 憑證權杖設定檔 1.1

WSS SOAP 訊息安全性 X.509 憑證權杖設定檔 1.1

用於在 wsSecurity 項目的 authenticationMode 屬性設為 "Username"、"Certificate" 或 "None" 時保護訊息。此外,當 wsSecurity 項目的 authenticationMode 屬性設為 "Certificate" 時,請使用此規格進行用戶端驗證。

<wsHttpBinding>
  <binding name="MyBinding">
    <security mode="Message>
      <message   
       clientCredentialType="Certificate"
       negotiateServiceCredential="false"
       establishSecurityContext="false"/>
    </security>
  </binding>
</wsHttpBinding>

安全性

WSS SOAP 訊息安全性 Kerberos 權杖設定檔 1.1

WSS SOAP 訊息安全性 Kerberos 權杖設定檔 1.1

用於在 wsSecurity 項目的 authenticationMode 屬性設為 "Windows" 時進行驗證和保護訊息。

<wsHttpBinding>
  <binding name="MyBinding">
    <security mode="Message>
      <message   
       clientCredentialType="Windows"
       negotiateServiceCredential="false"
       establishSecurityContext="false"/>
    </security>
  </binding>
</wsHttpBinding>

安全性

WS-SecureConversation

WS-SecureConversation

用於當 security/@mode 屬性設為 "Message",且 message/@establishSecurityContext 屬性設為 "true" (預設值) 時提供安全的工作階段。

安全性

WS-Trust

WS-Trust

WS-SecureConversation (請參閱前述) 所使用。

可信賴傳訊

WS-ReliableMessaging

WS-ReliableMessaging

當繫結設定為使用 reliableSession 時使用。

<wsHttpBinding>
 <binding name="myBinding">
   <reliableSession/>
  </binding>
</wsHttpBinding>

交易

WS-AtomicTransaction

WS-AtomicTransaction

用於交易管理員之間的通訊。WCF 用戶端和服務一律使用本機交易管理員。

交易

WS-Coordination

WS-Coordination

用於當 flowTransactions 屬性設為 "Allowed" 或 "Required" 時流動交易內容。

<wsHttpBinding>
  <binding transactionFlow="true"/>
</wsHttpBinding>

wsFederationHttpBinding 和 ws2007FederationHttpBinding

引進 wsFederationHttpBindingws2007FederationHttpBinding 項目以支援聯合案例,在這類案例中協力廠商會發出用來驗證用戶端的權杖。除了 wsHttpBinding 使用的通訊協定外,wsFederationHttpBinding 還使用:

  • WS-Trust,進行權杖發行。

  • WSS 安全性判斷提示標記語言 (SAML) 權杖設定檔 1.0 和 1.1,適用於最常見的發行權杖格式。

範例:

<wsFederationHttpBinding>
  <binding name="myBinding">
     <security mode="Message">
       <message issuedKeyType="Symmetric" 
                issuedTokenType="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1">
         <issuerMetadata address = 
         'https://localhost/FederationSample/HomeRealmSTS/STS.svc/mex'>
       </message>
     </security>
  </binding>
</wsFederationHttpBinding>

如需詳細資訊,請參閱 聯合 .

系統提供之中繼資料繫結

下表說明系統提供之互通中繼資料繫結所支援的通訊協定,該繫結由 System.ServiceModel.Description.MetadataExchangeBindings 類別公開。

mexHttpBinding

<mexHttpBinding> 繫結支援以下通訊協定。如需詳細資訊使用此繫結的詳細資訊,請參閱發行中繼資料

分類 通訊協定 規格和用法

傳輸

HTTP 1.1

HTTP 1.1

訊息

SOAP 1.2

Primer

訊息架構

附加 (包括 HTTP 繫結)

訊息

WS-Addressing 2005/08

Web 服務定址 1.0 - Core

Web 服務定址 1.0 - SOAP

中繼資料

WS-MetadataExchange

WS-MetadataExchange

WCF 實作 WS-MetadataExchange 以擷取 XML 結構描述、WSDL 和 WS-Policy。

mexHttpsBinding

<mexHttpsBinding> 支援以下通訊協定。如需詳細資訊使用此繫結的詳細資訊,請參閱發行中繼資料

分類 通訊協定 規格和用法

傳輸

HTTP 1.1

HTTP 1.1

ms730294.note(zh-tw,VS.100).gif注意:
已啟用傳輸安全性。

訊息

SOAP 1.2

Primer

訊息架構

附加 (包括 HTTP 繫結)

訊息

WS-Addressing 2005/08

Web 服務定址 1.0 - Core

Web 服務定址 1.0 - SOAP

中繼資料

WS-MetadataExchange

WS-MetadataExchange

WCF 實作 WS-MetadataExchange 以擷取 XML 結構描述、WSDL 和 WS-Policy。

另請參閱

概念

系統提供的繫結

其他資源

basicHttpBinding Element
wsHttpBinding Element
wsHttpDualHttpBinding Element
<mexHttpsBinding>
<mexHttpBinding>