Deployment Slot | Azure Web Apps

Sachin Modi
3 min readJan 14, 2021

We can add staging environments for application service plan. Suppose you want to test some deployment before promoting onto Production environment to do this we can use Azure Web App slot features which provide quick and easy configuration in Azure.

You can test the new version of promoted application in staging environment once you are happy then you can quickly swap to production environment.

Exercise:

We will first create web apps on Azure to do this, login to Azure and type app services in search bar click on Add and provide the below details as follows.

Ensure that you select the SKU which supports Deployment Slots Standard SKUs support Staging slots.

click next and next “Review and Create”.

Now I have a .NET core web application in my local machine which I will publishing onto this newly created webapp from Visual Studio.

Once this is done you can copy the app service url and paste in browser.

The initial deployed application slot is called production slot.

Now I am going to create a staging deployment slot where I will be promoting the new version code and then swap the slots.

Go to App Services → Deployment slots → Add Slot, provide the name and click on Add.

It creates a new url as below image.

Now you can go to new version of code base and publish the application from Visual Studio onto new deployment slot.

Now you can copy the url of the new deployment slot and paste in the browser you will notice he new version of application will be deployed.

Now we can easily and quickly swap the slot, to do this click on any of the slots and then click on Swap.

Now you will notice newer version code will be running on production slot.

--

--