Deploying an ASP.NET Core app - Will it Deploy? Episode 1

Rob Pearson

Rob Pearson

January 30, 2018 • 3 mins

Today, we're launching Will it Deploy? This is our brand new video series where we try to automate the deployment of different technologies with Octopus Deploy.

We're kicking off the series with a fun video as we try to deploy an ASP.NET Core web app to Microsoft's Azure platform. That alone is pretty easy, so we decided to make it a bit more interesting by automating the provisioning of our cloud infrastructure as well as ensure we have a zero-downtime production deployment.


Tech Stack

Our app is a quote generator called Random Quotes. This is fairly simple, but it'll allow us to walk through how to automate the deployment of a web application to Microsoft Azure platform.

Kudos to our marketing manager Andrew who has been learning to code and built the first cut of this app. Great work!

Deployment Target

Microsoft Azure logo


So will it deploy? Yes it will! Our deployment process looks like the following.

Octopus deployment process

The first step is to add an Octopus Azure account, which has all the details required to enable me to connect to the Azure platform, safely and securely. It is used to authenticate with Azure when deploying or executing scripts.

Octopus Azure account

Then we add the following steps to successfully deploy our app including cloud infrastructure provisioning and a zero downtime production deployment.

  • Octopus Deploy an Azure Resource Group step to provision our cloud infrastructure via an ARM Template.
  • Octopus Run an Azure Powershell Script step to ensure we always have a fresh App Service staging deployment slot. We call the Azure Powershell cmdlets to delete and create an App Service deployment slot.
  • Octopus Deploy an Azure Web App step to deploy our web application to our App Service staging deployment slot.
  • Octopus Run an Azure Powershell Script step to swap our App Service staging and production (live) deployment slot. This is only done during a production deployment so that we achieve zero-downtime!

This project uses the following variables to store our resource group name, website name, and app settings. Nice and simple!

Project variables

This episode's GitHub repo contains all the resources and links used in this video.


We hope you like this new series, and we hope it can help people around the world learn how to automate the deployment of their application and services.

Don't forget to subscribe to our YouTube channel as we're adding new videos regularly. If there's a framework or technology you'd like us to explore, let us know in the comments.

Happy deployments! 😃

Learn more