WCF寻址
1.如果在<System.ServiceModel>.<Services>.<Service>.<host>.<baseaddress>定義了基址那么尋址有以下幾種情況
1 第三個終結點定義指定一個絕對地址,如下面的示例配置所示。 2 <endpoint address="http://localhost:8001/hello/servicemodelsamples" 3 binding="wsHttpBinding" 4 contract="Microsoft.ServiceModel.Samples.ICalculator" /> 5 6 !-- The relative address specified: use the base address --> 7 <!-- provided by the host + path. The endpoint address is --> 8 <!-- http://localhost:8000/servicemodelsamples/service/test. --> 9 <endpoint address="/test" 10 binding="wsHttpBinding" 11 contract="Microsoft.ServiceModel.Samples.ICalculator" />在終結點還可以指定一個絕對地址和一個不同的傳輸協議 (TCP)。基址在地址中不起作用。實際終結點地址為 net.tcp://localhost:9000/servicemodelsamples/service。 <!-- The absolute address specified, different transport: --> <!-- use the specified address, and ignore the base address. --> <!-- The endpoint address is --> <!-- net.tcp://localhost:9000/servicemodelsamples/service. --> <endpoint address="net.tcp://localhost:9000/servicemodelsamples/service"binding="netTcpBinding"contract="Microsoft.ServiceModel.Samples.ICalculator" /> </service> 全址:終結點是否有全址? 終結點中的全址 :基址+終結點中的相對地址
?
轉載于:https://www.cnblogs.com/lihongchen/p/3607902.html
總結
- 上一篇: 蓝桥杯 马虎的算式
- 下一篇: JavaScript初学笔记