Hello,
In this article, I will explain how to quickly create an application in the cloud using the Windows Azure platform. This article assumes that you’ve already signed up for Windows Azure account and that you’ve also installed Microsoft Visual Studio 2010 with the Windows Azure SDK.
If you haven’t signed up for a Windows Azure account, you can do so at the following link by clicking the Sign up now button:
Note: All images in this blog posting are click-able and will open up new windows showing the details in high resolution.
Creating the Application in Visual Studio 2010
In order to begin creating your application for the cloud, you’ll need to open up Microsoft Visual Studio 2010. It’s recommended to launch Microsoft Visual Studio 2010 with administrator privileges by right-clicking Microsoft Visual Studio 2010 and clicking Run as administrator, however, I’ve tested the steps in this article without doing this and everything worked correctly. This is probably due to the fact that my user account for the development machine is a member of the local administrators group. Nonetheless, when you’ve got Microsoft Visual Studio 2010 open – conduct the following steps so you can brag to your friends:
- On the File menu, click New, and then click Project
- Under the Installed Templates tree on the left, select Cloud
- Select Windows Azure Project and then name your project and solution. I’ve chosen Nimbo-Hello-World as my project and solution name as shown in the image. Further, I’ve elected to keep the default location of the project which is in the Visual Studio 2010\Projects folder of My Documents
The steps above are highlighted in the image below:

- In the left section which displays the available roles, select ASP.NET Web Role
- Click the right arrow to move the selection in to the Windows Azure solution box and click OK
The steps above are highlighted in the image below:

- To modify Default.aspx, open Solution Explorer. If Solution Explorer is not visible, from the View menu, click Solution Explorer. Within Solution Explorer, expand WebRole1 and double-click Default.aspx.
- For this exercise, I have changed the header to Cloud Computing Application and also inserted some text which says This is a cloud computing application!. You can place anything you want here. For more a more advanced implementation – you could display an image which you’ve got stored in Windows Azure BLOB Storage. However, for this article we’re simply going to get a basic application going.
The steps above are highlighted in the image below:

A this point, you’re ready to compile and run the application. There’s not much (if anything) to debug here – so we’ll skip that part. The steps below show the process of how to do this.
- Click Debug in the top menu.
- Click Start Without Debugging.
The steps above are highlighted in the image below:

The development storage is initialized as shown in the image below (simply click OK):

As you can see, the application runs locally in the Windows Azure Compute Emulator. This is displayed in the image below:

Close Internet Explorer (or whatever browser is open and running the application) and have a look at your project in Microsoft Visual Studio 2010. In the Solution Explorer there are two files displayed which are called ServiceConfiguration.cscfg and ServiceDefinition.csdef. The .csdef extension is for cloud service definition files. The .cscfg extension is for cloud service configuration files. At a high level, the ServiceDefinition.csdef file contains metadata used by Windows Azure when hosting your application, including, for example, which roles are in your application. The ServiceConfiguration.cscfg file provides configuration settings for your application as well as the number of instances to run for each role. You don’t need to do anything with these files at this time.
The details in the above paragraph are highlighted in the image below:

Deploying the Application to Windows Azure
The next step is to publish the application. There is an option to do this straight to Windows Azure, but for this article we’re going to utilize the process of publishing the application in the form of local files and then manually uploading them to the Windows Azure Development portal. In order to do this, complete the following steps:
- Right click the name of your project (for my example I will right click Nimbo-Hello-World
- Click Publish
The steps above are highlighted in the image below:

- Select the Create Service Package Only radio button and click OK
The step above is highlighted in the image below:

Once you’ve published the project as a Service Package, Visual Studio will create two files in the bin/Debug/Publish directory of your specified Project location when you created the New Project in the earlier steps.
The details in the above paragraph are highlighted in the image below:

Next, you’ll need to log in to the Windows Azure Development Portal.
The details in the above paragraph are highlighted in the image below:

Sign in with your Windows Live ID as shown in the image below:

Click the Hosted Services, Storage Accounts & CDN on the left menu, select the subscription you will use for the application in the center section, and then click New Hosted Service on the top left of the screen.
(Note: If you have not installed Silverlight you’ll need to do so to use the latest version of the Windows Azure Development portal. Your browser should notify you of this, however, if you want to manually download Silverlight you may do so at the following link: http://www.microsoft.com/getsilverlight/Get-Started/Install/Default.aspx)
The details in the above paragraph are highlighted in the image below:

On the Create a New Hosted Service screen, complete the following steps:
- Enter a Name for your Service (for this article, I’ve entered Nimbo-Hello-World)
Enter a URL prefix for your Service (for this article, I’ve entered Nimbo-Hello-World)
- Select a region (for this article, I’ve selected North Central US
- Select the Deploy to stage environment radio button in the Deployment Options menu
- Ensure the Start after successful deployment check box is selected
The steps above are highlighted in the image below:

Scroll down if the full menu isn’t displayed and complete the following steps:
- Enter a name for the deployment in the Deployment Name text box (for this article, I’ve entered Nimbo-Hello-World
- Select Browse Locally in the Package location section, and browse the the location of the *.cspkg file which is located in the bin/Debug/Publish directory of your specified Project location when you created the New Project in the earlier steps (for this article, I’ve selected the Nimbo-Hello-World.cspkg file)
- Select Browse Locally in the Configuration file section, and browse the the location of the *.cfcsg file which is located in the bin/Debug/Publish directory of your specified Project location when you created the New Project in the earlier steps (for this article, I’ve selected the ServiceConfiguration.cfcsg file)
- Click OK
The steps above are highlighted in the three images below:



The next step in this process is to accept the warning message Windows Azure displays. The reason for this is that by default, the configuration of your application only has one instance of the web role defined (this setting is contained in the ServiceConfiguration.cscfg file). There’s no point in paying for additional instances at the moment because this is an application which does not require additional performance or a higher SLA.
The details in the above paragraph are highlighted in the image below:

The next steps of the process are where Windows Azure receives the files you’ve selected for upload, processes them, and kicks off the instance. Since we’re dropping this in a staging environment – the URL (or DNS Name) Windows Azure creates for the application will be something long and not easily identifiable. When you deploy the application to production (not covered in this article – although quite easy) – you’ll be able to access the application by browsing to a more easily readable URL.
The details of the above paragraph are displayed in the four images below:




Once the status for the application displays as Ready across the board, you can click the DNS name as shown in the above image and you’ll be able to access your Windows Azure Cloud Application. (Note: This process takes time. You may experience a wait time of 10-30 minutes before the application shows as being completely ready. This would be an excellent time to take a break and do something fun.)
The details of the above paragraph are displayed in the image below:

- Ira Bell