我想在Azure上使用Slot Swapping来获取WCF服务。我知道我们可以直接在Azure中执行appSettings。我找不到配置system.serviceModel / client的选项,但是对于插槽交换,我需要3个端点配置,每个插槽一个我有
<system.serviceModel>
<client>
<endpoint address="http://myservice-devslot.azurewebsites.net/ServiceName.svc" ... />
</client>
这将是1个插槽的配置,因为它显示在地址中:dev-slot
或者是否有其他方法来管理端点?
答案 0 :(得分:3)
好的,我通过代码配置了端点地址,并在AppSettings中添加了一个EndPointAddress密钥。现在我只需在Azure中单击一下就可以从TEST交换到INT等。谢谢大家
wcfServiceClient.Endpoint.Address = new EndpointAddress(endPointAddress);
答案 1 :(得分:1)
要根据您要将应用程序部署到的目标环境来编辑配置文件,您通常会使用config transformations。
正如您使用azure一样,请以this article为Brady Gaster作为起点。它描述了整个过程非常详细。