Search code examples
c#wcfazureazure-web-app-servicewcf-endpoint

Azure Slot Swapping: Configure WCF endpoint in Azure


I want to use Slot Swapping on Azure for a WCF Service. I know that we can do the appSettings directly in Azure. I couldn't find an option to configure the system.serviceModel/client, but for slot swapping i need 3 endpoint configurations, one on each slot I have

<system.serviceModel>
<client>
  <endpoint address="http://myservice-devslot.azurewebsites.net/ServiceName.svc" ... />
</client>

This would be the configuration for 1 slot, as it's shown in the address: dev-slot

Or is there an other approach to manage endpoints?


Solution

  • Ok, I configured the endpoint address through Code and added an EndPointAddress Key to the AppSettings. Now I can swap from TEST to INT etc by just do one click in Azure. Thanks everyone

            wcfServiceClient.Endpoint.Address = new EndpointAddress(endPointAddress);