1
我有一個Windows Azure雲服務項目,其中包含多個Web角色以承載一些服務。我想使用ServiceX in ServiceY(每個在上運行,不同角色)使用相對 URL。配置WCF客戶端端點以使用相對地址(適用於Azure)
,這是我主持ServiceX方式:
<service name="ServiceX">
<endpoint address="" binding="basicHttpBinding" contract="ServiceX" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
現在我想用在ServiceY該服務。一個絕對的URL它工作得很好:
<system.serviceModel>
<client>
<endpoint name="ServiceXProxy"
address="http://mycloudservice.cloudapp.net:8080/ServiceX.svc"
binding="basicHttpBinding"
contract="ServiceX"/>
...
但是我怎麼能ServiceY ServiceY與相對地址?這不可能,因爲他們在同一個雲服務上運行?