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

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.

主站蜘蛛池模板: 刚察县| 永善县| 华坪县| 石首市| 花莲县| 竹山县| 习水县| 高雄县| 郎溪县| 大渡口区| 平阴县| 鹤峰县| 潮安县| 团风县| 枞阳县| 郧西县| 南京市| 太仓市| 隆尧县| 湾仔区| 牙克石市| 浮山县| 裕民县| 江永县| 鸡泽县| 巴南区| 白玉县| 巴南区| 宁河县| 长宁县| 绥中县| 綦江县| 丹东市| 巫山县| 霸州市| 阜南县| 榕江县| 保德县| 阳东县| 麟游县| 绩溪县|