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:

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:

Then name the ASP.NET Web Web Role:

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.

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.

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.

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




04. Jan, 2010 







No comments yet... Be the first to leave a reply!