While using azure appservice deployment slots the urls for the sites (which ever has the slot) change and on swap it should not get swapped. In Sitecore commerce - we have Y.Commerce.Engine we have url to shops and ops hardcoded

<commerceEngineConfiguration type="Sitecore.Commerce.Engine.Connect.CommerceEngineConfiguration, Sitecore.Commerce.Engine.Connect"> <shopsServiceUrl>https://commerceauthoring.sc.com/api/</shopsServiceUrl>

The url should remain same upon swap. We have defined rule on the azure configuration as in below . based on this config I should be able to change the url dynalically with patch config. How can we achieve this? How the Patch config will look like? screenshot

  • need more info.. You want the commerce engine url to be same on deployment slot and main slot? It should be automatic if you have role based configs. – sc.kautilya Jun 3 at 15:44
  • Hi Kautilya, I need 2 different urls for shop and also we have commerce engine specific to slot. ex: for staging: the <shopsServiceUrl> should be commerceauthoring.sc.com-staging/api and for Production it should be commerceauthoring.sc.com/api without staging keyword. – Jyoti Jun 3 at 16:54
  • so u need slot specific configs. You can do that by adding a new config setting called "Slot", add it in the web.config just like role and then reference it in the sitecore config files just like role. I hope your web.config is not overwritten by deployments. – sc.kautilya Jun 3 at 18:49
  • web.config is not part of deployment. But when you do swap of slots in azure everything (including configs) will be swaped- for more info on what exactly happen on swap please go through the link: learnwithshahriar.wordpress.com/2015/08/05/… – Jyoti Jun 4 at 16:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.