官术网_书友最值得收藏!

Choosing an endpoint address

It's great that we've talked about the important C (the contract) in the ABCs of WCF endpoints, but the story is far from complete. So far, we have a service definition completely devoid of transport information. Where does someone go to consume this service? The goal of the endpoint address is to:

  • Tell us the communication scheme
  • Tell us the location of the service

WCF provides a number of out-of-the-box communication schemes for accessing WCF services. These include options such as:

  • HTTP
  • TCP
  • MSMQ

When looking at a service URI such as https://packt:8081/VendorService/SecureVendorService.svc, what am I able to infer from this WCF address? First, I can see that I'm using an HTTP/S scheme in order to secure my HTTP transmission channel via SSL certificates. Next, I can tell that the domain hosting this service is called packt and uses port 8081 for the HTTP/S traffic. Finally, I can gather the path of the service that I wish to call.

We'll see shortly how to actually set up a WCF service to listen on the address of your choice. For now, simply note that the address of a service is a key part of the whole service endpoint.

主站蜘蛛池模板: 乌鲁木齐市| 凯里市| 瓦房店市| 宝兴县| 佛山市| 九江市| 平阳县| 垣曲县| 延长县| 封丘县| 龙游县| 温泉县| 六枝特区| 诸城市| 河北省| 扶绥县| 嵊州市| 容城县| 南京市| 行唐县| 西林县| 大化| 昆山市| 隆安县| 昌图县| 临夏市| 安陆市| 理塘县| 万全县| 漠河县| 东山县| 巫山县| 乌恰县| 阳新县| 保靖县| 安仁县| 绥阳县| 米易县| 西和县| 黔江区| 嘉峪关市|