Microsoft & .NETVisual C#Deploying your Azure application to the Cloud

Deploying your Azure application to the Cloud

Introduction

In an earlier article, we saw how to create a simple Azure application. In this article, we will learn how to deploy our Azure application to the cloud, to make it a real cloud application.

ToolSet needed

In order to be able to deploy a Microsoft Windows Azure application, you will need:

Hands-On

If you have a project you created earlier following the “Creating a Simple Microsoft Windows Azure Application“, you can continue using that Visual Studio project to deploy.

If you do not have a project, you can download a pre-created solution here.

Open the “MyFirstAzureProject” in Visual Studio. Right click on MyFirstAzureProject and select Publish.

Figure 1

In the first phase, we will get the application packaged and ready for deployment. To do this, select “Create Service Package Only” and click “OK”.

Feature 2

Visual Studio will then proceed to create package. It should be created at the following path MyFirstAzureProjectbinDebugPublish.

You will notice two files in that folder.

Filename Purpose
MyFirstAzureProject.cspkg Package file for the Windows Azure application
ServiceConfiguration.cscfg Service configuration file for the Azure application

Deploying to the cloud

To deploy to the cloud, Login and if prompted, select to navigate to the new portal (There is a new Management portal deployed in January 2011). Select Hosted Services, Storage Account and CDN from the bottom left.

Figure 3

Click New Hosted Service in the top ribbon

Figure 4

In the popup window, fill in the details

Figure 5

Figure 6

For the package location, click browse locally and select the Deployment file created ago. Click OK to start validation of your service.

You might be greeted with a warning stating that you need more than one instance.

Figure 7

Go ahead and override the warning and click Yes.

You will see that the new Azure service has begun deploying to the cloud in the production environment.

Figure 8

After a minute, you can see that Deployment, Role and Instance are still “Initializing” and “Creating”. It can take up to 15 minutes for the application to be ready.

Figure 9

Once Deployment, Role and Instance display “Ready” status, your application is cloud ready.

Figure 11

At this time, you can navigate to the deployment node, and see the DNS name of your Azure application.

Figure 12

If you click on that URL, it will take you to your cloud application.

Figure 12

Summary

In this article, we saw how to deploy your Windows Azure application from your machine to the cloud. Hopefully, you have found the tutorial useful to you. About the author Vipul Patel is a Software Engineer currently working at Microsoft Corporation. He is currently working in the Office Communications Group and has worked in the .NET team earlier in the Base Class libraries and the Debugging and Profiling team. He can be reached at vipul_d_patel@hotmail.com

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends & analysis

Latest Posts

Related Stories