Deploying an existing ASP.NET & WCF project to Azure Cloud Services

Azure Cloud Services

TL;DR: Clone & follow the steps from my GitHub repo WCFDemoApp to get started.

Recently I was able to work with a local company that had a fairly common 2-tier environment consisting of a web front end in ASP.NET and a middle tier (API) using WCF connected to a SQL database all hosted in their co-location environment on their own servers. They wanted to move this workload to the cloud and so I took this opportunity to build a walkthough on how to do exactly that.

Azure SQL Database

The first stage was to move their existing SQL database from a co-located SQL Server into Azure SQL Databases. Azure SQL database is a relational database-as-a-service affording you the ability to scale your database, tunable performance, high availability, data protection, etc.

It’s a pretty straight forward process, to learn more about Azure SQL I recommend the Azure Documentation which includes a section on Migrating data to Azure SQL Database.

I like this approach as you do not have to manage a VM, install SQL Service etc. You simply request a database with the right performance/configurations you need and in minutes you are ready to go.

Azure Cloud Services

The next step involves creating two cloud services, one to host the web front end (web app) and another to host the API (WCF Service). Luckily this is pretty easy thanks to the Azure SDKs for .NET which adds Cloud Services solutions top Visual Studio and the ability to import existing projects as roles into your cloud services.

To get a solid overview of Cloud Services I highly recommend checking out the videos & documentation for Azure Cloud Services on

There are a few different ways to host a web or api app in Azure including Web Apps, API Apps and of course IaaS (Virtual Machines). However, I recommended Cloud Services because it was the quickest and easiest migration path, as well as their developers can test locally using the Azure Emulator (which can emulate multiple cloud services and multiple role instances).

Tutorial & Demo App

To help learn the basics and get going I have created a demo solution with a WCF & ASP.NET project and a step by step tutorial (see the on how to configure and deploy these as instances in their respective cloud services.

Clone & follow the steps from my GitHub repo WCFDemoApp to get started.


Leave a Comment

Your email address will not be published. Required fields are marked *