0
votes

I have an ASP.NET MVC application deployed to a standard Azure web app service. I also configure the web app to have 1 deployment slot called 'staging'. First, I published my web app using VS2015 publishing tool to staging slot and tested. It worked so I swapped it with production slot. Then, I published another version with some code changes to staging slot again. It published directly to my production slot. I thought Azure web app production slot is now actual staging slot after swapping. How can I make the web app always publish to the slot that is not currently live (i.e. production slot) to test before swapping again?

I published the web app by right click on the web project and select publish, enter my azure subscription ID and password, select web app and publish.

Thank you

2

2 Answers

2
votes

I've found out what is happening with the publish process. VS2015 publishing tool does not allow to select specific slot to deploy the web app. It will deploy to production slot if you choose the web app from the selection list. For some reason, it published to my staging slot at the first time and it caused my confusion.

To make the publish wizard to deploy web app to staging slot, I had to download the publish profile from my staging slot on Azure Portal and copy the information from it to the publish wizard. The info needs to copy includes publishUrl, msdeploySite, userName, userPWD and destinationAppUrl. After updating the publish profile, my publish wizard now always deploys to my staging slot.

0
votes

The staging slot is always considered the staging slot. Behind the scenes, it is working some DNS magic, but that is nothing that you have to plan for.