Azure Tutorial – Building a ‘Hello Azure’ App in Visual Studio

The first thing to do is download and install the Azure Tools & SDK , this installs the Visual Studio templates as well as a simulated Azure environment on your local machine.  To run the development environment from Visual Studio, you will need to run the Visual Studio as an admin.

In Visual Studio, start a Cloud Project from File -> New Project… . In the New Project dialog select either Visual Basic -> Cloud Service or C# -> Cloud Service:
ScreenHunter 01 Dec. 27 13.27 Azure Tutorial   Building a Hello Azure App in Visual Studio


Next, select the type of role for to be used. In this demonstration we will select an ASP.NET Web Role which is similar to an ASP.NET website.  Highlight “ASP.NET Web Role” and click the ‘>’ button:

ScreenHunter 02 Dec. 27 13.28 Azure Tutorial   Building a Hello Azure App in Visual Studio


Then name the ASP.NET Web Web Role:

ScreenHunter 03 Dec. 27 13.29 Azure Tutorial   Building a Hello Azure App in Visual Studio


The local Azure application is now created. There are two parts to the solution – the Cloud Service (“CloudService2″) which contains definitions and configurations for running the app on Azure, and the Web Role (“Hello”) which is the ASP.NET website. You add some functionality to the default.aspx page at this stage if you wish.

hello2 Azure Tutorial   Building a Hello Azure App in Visual Studio

NOTE – To add Roles to the solution, right-click on the Roles folder in the Solution Explorer and select Add and select the Role to add to the solution.

In the Solution Explorer double-click CloudServices2 -> Roles -> Hello. This loads the configuration settings for the Azure application. In this example we will be changing the Instance count to 2. This will result in our app being run on two instances and enjoying automatic load-balancing between the two instances. Once this change has been made, Hit F5 to run the application.

helloworld3 Azure Tutorial   Building a Hello Azure App in Visual Studio


Once the web page is running there should be a blue Windows Azure Simulation Environment icon in your desktop icon-tray. Right click this and select Show Development Fabric UI to launch the Development Fabric tool. The Dev Fabric is the tool to interact, view and control the local Azure Environment. Expanding the nodes will show two green nodes below the Hello Role. These are the two instances of the ASP.NET application. Selecting them will bring up the running info of the instance.

helloworld4 Azure Tutorial   Building a Hello Azure App in Visual Studio


That’s it! this has been an extremely brief run through and in later articles we will go into greater depth. Next, we can move on to Deploying the App on Azure.

Related Articles:

Twitter Digg Delicious Stumbleupon Technorati Facebook Email

2 Responses to “Azure Tutorial – Building a ‘Hello Azure’ App in Visual Studio”

  1. This information is very helpful.

  2. That’s very cool and easy.
    I guess I will be looking to dive deep into Azure platform