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
Publish Web API

Choose Microsoft Azure App Service:

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
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.

App Service Plan
App Service Plan

Create it.

Deploy to Azure

With our App Service Created, we can now publish to it.

Publish Web Deploy
Publish Web Deploy

…and we’re done…

Web App was published successfully
Web App was published successfully

Try it: https://morsecoderwebapi.azurewebsites.net/api/translator

Azure Translator
Azure Translator

Summary

Where are we?

  • We have a fully functional translator Web API deployed to Windows Azure.

Where are we heading?

  • Consuming our new Endpoint from our UWP app;
  • Implementing a LiveTileUpdate;
  • Making the app User Experience (UX) more friendly.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s