Web API Tutorials Part 5 : Azure Deployment from Visual Studio

Microsoft have made it extremely easy, almost trivial to deploy your web applications to the Azure cloud from Visual Studio. Cloud capability is incredibly powerful for scalability, particularly in enterprise level applications and affords Developers with the option to make their infrastructure as Agile as their Software.

Outcome

By the end of this tutorial, we’ll have deployed our Web Application directly into a Web Site in Azure using their Platform as a Service offering (PaaS), meaning we don’t need to worry about a Virtual Machine, updates, and a myriad of other concerns.

Implementation

Publish to Azure

Right click your WebAPI project and Select Publish:

Publish Web API

Choose Microsoft Azure App Service:

Microsoft Azure App Service

Now we need to create our App Service. We need to provide :

a Web App Name;

a subscription type;

a Resource Group;

an app Service Plan

You can think of a Resource Group as a collection of related infrastructure. For example this blog runs in a Web App in Azure, in a Resource Group that also contains it’s database. You can partition your environment any way you like but in an enterprise you may choose to have a Resource Group per environment or per Layer, etc.

Create App Service

An App Service plan is how you are planning to pay for it and the scale of the machine you wish to create.