指定以 <webHttpBinding> 配置端點的安全需求。
<組態>
<system.service模型>
<裝訂>
<webHttpBinding>
<裝訂>
<安全>
語法
<system.ServiceModel>
<bindings>
<webHttpBinding>
<binding name = "String">
<security mode="None/Transport/TransportCredentialOnly">
<transport clientCredentialType="Basic/Certificate/Digest/None/Ntlm/Windows"
proxyCredentialType="Basic/Digest/None/Ntlm/Windows"
realm="String" />
</security>
</binding>
</webHttpBinding>
</bindings>
</system.ServiceModel>
屬性和項目
下列章節說明屬性、子元素和父元素。
Attributes
| Attribute | Description |
|---|---|
| mode | 指定端點是否使用傳輸層級安全措施。 預設值為 None。 此屬性的類型 WebHttpSecurityMode為 。 |
模式屬性
| 價值觀 | Description |
|---|---|
| None | 安全系統已關閉。 |
| Transport | 安全性透過 HTTPS 提供。 服務需要設定 SSL 憑證。 該訊息完全以 HTTPS 保護,服務由用戶端使用服務的 SSL 憑證進行認證。 用戶端的認證是透過ClientCredentialType傳輸<屬性>來控制的。 |
| 僅傳輸憑證 | 此模式無法提供訊息完整性與機密性。 它提供基於 HTTP 的用戶端驗證。 此模式應謹慎使用。 它應用於傳輸安全由其他方式提供(如 IPSec),且 WCF 基礎設施僅提供用戶端認證的環境。 |
子專案
| 元素 | Description |
|---|---|
| <交通> | 定義運輸安全設定。 此元素對應於 HttpTransportSecurityElement 類型。 |
父項目
| 元素 | Description |
|---|---|
| <webHttpBinding> | 一個綁定元素,用於設定 Windows Communication Foundation(WCF)Web 服務的端點,這些端點會回應 HTTP 請求而非 SOAP 訊息。 |