1

I am experiencing a strange issue with Visual Studio Community 2015 web deployments to azure web apps. I have a Production slot and a Staging slot. When I perform a Web Deploy to Staging, it is also overwriting the web.config in the Production slot!

  1. The web.config is transformed correctly per my staging web.config transformations and I can validate this by looking locally at it in obj\Staging\TransformWebConfig\transformed\web.config.
  2. The log in the build output window in VS all looks correct Updating file (xxxx__staging\Web.config).

Yet when I run the application in the PROD slot, it is pointing to the database that was designated in the Staging web.config. And when I view the web.config in PROD via FTP, I see that all the STAGE web.config transformations are there as well. So from what I can tell, the STAGE web deployment is updating BOTH the Prod and Stage files...well at least the web.config file.

The reverse is also true. When doing a web deploy to PROD, it is overwriting the web.config in STAGE as well.

Is there some sync setting that tells Azure to sync these deployment slots or some other logical explanation?

crichavin
  • 4,672
  • 10
  • 50
  • 95
  • 1
    Maybe you have autoswap on? So it deploys to stage, and then swaps slots. Two deploys - and you have stage in both slots – Lanorkin Nov 16 '16 at 07:59
  • @Lanorkin Yes! I did have autoswap set up. I have turned it off but need to test it yet to confirm. If you make this an answer, I can accept it after I test. Thanks! – crichavin Nov 16 '16 at 16:41

1 Answers1

1

This looks like you have autoswap feature turned on, so VS swaps slots right after deploy. Two deploys to stage - and you have the same env in both slots.

Lanorkin
  • 7,310
  • 2
  • 42
  • 60
  • To check **Auto-Swap feature**, go to your `Deployment Slot > Application Settings > Auto-Swap = On/Off` – hiFI May 25 '17 at 08:02