ASP.NET: Getting Started with azure

p_getting_started_with_windows_azure

Windows Azure, cloud computing/hosting platform has been announced on the recent PDC 2008. Now as the dust settled I decided to give it a try. For the moment it is still available as a CTP – Community Technology Preview, so if you like you can test its functionality and deploy applications into ’the cloud’. At this time the pricing for the paid version of this service has not been determined but as Microsoft promises it will be competitive with the pioneers of cloud based storage, Amazon’s Web Services. So, lets get started with going trough the process of deploying a simple Hello World (or Hello Cloud) application, in this case made with ASP.NET (as it is possible to write your apps in Java in Ruby also)

First things, first.

Before you we can start, we need to collect a few SDK’s from Microsoft.

Windows Azure Software Development Kit (March 2009 CTP)

Windows Azure Tools for Microsoft Visual Studio March 2009 CTP

Microsoft .NET Services SDK (March 2009 CTP)

SQL Data Services (SDS) SDK (CTP)

While the above files are being downloaded its time to take care of formalities. To register for Windows Azure CTP go here. (You will need a Windows Live ID).

Hello Azure!

If all went well during  installation we should have following additional project templates available in Visual Studio:

image

We choose a web cloud service and following solution structure is created:

image

First project is a Service Configuration (we will need to provide some information here later on) the second is the actual Web Role project similar to typical ASP.NET project.

Lets just put some text in the Default.aspx and head straight over to our Azure Services Developer Portal and create a New Hosted Services Project:

image

Microsoft does not require much text boxes to fill out:

image

…and:

image

After successfully creating a project lets copy the Application ID:

image

…and paste it in our Service Configuration project’s properties in the Portal tab.

DEPLOYMENT

As you see in the image above we have to ‘containers’ for our project, Staging and Production. To deploy your project select the Service Configuration project and hit Build –> Publish. The Azure site will be opened along with a contents of the bin/Debug(or Release)/Publish folder. Click Deploy and select respective file from the Publish folder:

image

After we click Deploy again files will be uploaded and finally you will see following screen:

image

So we have successfully deployed our project into the staging area, we can now run it and use the temporary random url to check if all is OK. (You need to wait until the Web Role status changes from Allocated –> Initializing –> Started).

After that we can hit the arrows to promote the project from Staging to Production, and that it. In my case http://kamilzadora.cloudapp.net is serving my Hello Cloud app! (please note that by the time you read this post this link may not be valid).

I hope to write about Azure Services a bit more as we didn’t even touched the storage and SQL options.

0 Responses to “ASP.NET: Getting Started with azure”


  • No Comments

Leave a Reply