crichavin
crichavin

Reputation: 4582

VS 2015 Web Deploy to Azure Web App Staging deployment slot overwrites PROD slot

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?

Upvotes: 1

Views: 292

Answers (1)

Lanorkin
Lanorkin

Reputation: 7534

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.

Upvotes: 1

Related Questions