該 client 元素定義了客戶端可連接的端點清單。
<組態>
<system.service模型>
<客戶端>
語法
<system.serviceModel>
<client>
<endpoint>
</endpoint>
<metadata>
</metadata>
</client>
</system.serviceModel>
屬性和項目
下列章節說明屬性、子元素和父元素。
Attributes
None
子專案
| 元素 | Description |
|---|---|
| <終點> | 包含一組端點元素,指定該用戶端可連接的端點。 |
| <元資料> | 包含處理元資料的設定。 |
父項目
| 元素 | Description |
|---|---|
| <system.serviceModel> | 所有 Windows 通訊基礎(WCF)配置元素的根元素。 |
備註
此 client 區定義了客戶端可連接的端點清單。 用戶端區塊中列出的每個端點都定義了自己的綁定、行為與契約。 其唯一識別方式是 與 name 屬性的組合contract。 用戶端程式碼指定 name 要連接到用戶端實作服務的端點。 若 name 該屬性被省略,該端點將作為其所實作合約的預設端點。
此外,本節也規定了處理元資料的設定。
Example
<client>
<endpoint address="/HelloWorld/"
bindingConfiguration="usingDefaults"
name="MyBinding"
binding="customBinding"
contract="HelloWorld">
<addressProperties actingAs="http://www.microsoft.com/TestActor"
identityData="BasicReadWrite"
identityType="Spn"
isAddressPrivate="false" />
</endpoint>
</client>