HowTo: First steps with the Windows Azure CTP and the first "HelloWorld"

imageIn my last blogpost I talked about different cloud computing providers, like Google, Amazon and Microsoft.

Today I want to describe Windows Azure more and show you how to use the Windows Azure CTP and how to publish a "Hello World" app in the "cloud".

Azure Service Platform 
The Azure Service Platform use "Windows Azure" as it´s core:

image

Azure offers basic functionality, like resource sharing, monitoring and so on. You can host Web- or- Worker-Processes on it or use it as blob or table storage.
Everything on Azure can be accessed via REST interfaces.

Services on Azure
Microsoft itself build some services on top of Azure:

Information about Windows Azure
To learn more about Azure I recommend you to have a look at these videos:

(Even if this video player destroy the blog design – it´s worth ;) )

Let´s start! 
Now have a look at the real Azure system. The whole Azure thing is currently only a CTP, but should be released at the end of the year.
My first application will be a "Hello-World" app (yeah, I know, this example sucks ;) )

Step 1: SDKs + Access Key
You can find the SDKs on the Windows Azure website (www.azure.com) and download it without having an access key. 

  • Windows Azure SDK (help files, concepts)
  • Windows Azure Tools for Microsoft Visual Studio (dev environment)

You need the access key to upload projects to Azure. Register on MS Connect to get an access key.
All services (SQL Data, .NET Services…) needs a specific code.

Step 2: Create Web Cloud Service Project
After the installation of the "Windows Azure Tools for MS VS" you will see a new category "Cloud Services" – we want to create a "Web Cloud Service" project:

image

Visual Studio creates two projects in your solution:

image

  • "WindowsAzureHello":
    • Contains configs for the "Cloud"
  • "WindowsAzureHello_WebRole":
    • A standard ASP.NET project

Step 3: First steps with the cloud-debugging environment / "Development Fabric"
If you hit F5, several processes will start. The development storage creates a SQL server database on your local SQL server (download SQL Express). The development storage simulate the Azure database:

image 

image

A look inside the DevelopmentStorageDb:

image

You should see a new icon in your Windows Tray: image

This is the "Development Fabric", which simulate the hosting environment of Azure:

image

image

Step 4: Add "Hello World" to your ASP.NET page
I add these lines to my default.aspx page:

    <form id="form1" runat="server">
    <div>
        Hello World @ Code Inside Blog <br />

http://code-inside.de

    </div>
    </form>

Step 5: Publish cloud service

In this step we publish your "WindowsAzureHello"-project. Just "publish" it via the context menu and you should get these two files:

image

Now *right click* on your "WindowsAzureHello" project and get the context menu with two additional buttons and go to the portal:

image 

Step 6: Create a Hosted Service on Windows Azure

Now create a "Hosted Service" project on the Azure Service page:

image

Type the name of your project and type a (sub)-domain:

image

After your project is created, you see this website:

image

"Production" is your live app and "Staging" is just to test your app. At first you have to deploy your app on the "Staging" environment.

Step 8: Staging deployment

Select the two files, which we created in step 5 and upload it. After the upload processs is finished, the package will be deployed to the staging environment.

image

image

If this process finished you should see this:

image

Now you can click on the URL and test your app – here is my demo-app:

image

Step 8: Move it to "Production"

If you want to move your app to the "Product"-environment, just click on that button:

image

… and now the app is live under your own subdomain (remember: this is just a CTP) :

image

You can see my demo web page live at: Azure Link

Fast track:

This maybe sounds difficult, but it just takes 3 minutes:

Result:

The Visual Studio tools are great and I´m really interested in the future of Azure (and the pricing ;) ). You can now play with Windows Azure and don´t need to relearn everything from the ground.

But, of course, you have to be careful with session handling, because your application can run on many different maschines and each request goes to another maschine.

If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.

About the author

Written by Code Inside Team

Currently there is no additional info about this author.

Comment on this post

Recent Posts

  • image1528-570x194_thumb.png
    Introduction to Redis on Windows & Redis usage with .NET

      Redis belongs to the NoSQL data banks and you will find it in the group of Key-Value Stores. Redis is often named “Blazing Fast” and according to the Stackoverflow Thread it is used to be two time (while writing) and three times (while reading) quicker than MongoDB. Even if the comparison is a little ...

  • Automated Security Analyser for ASP.NET websites

    Evil Hackers are lurking everywhere and many Web-applications are delicately and share “too much” with the attacker. A quick (first!) overview offers the Tool “ASafaWeb”. All the website does is making a few requests and writing an Analyses including problem solving’s. There are no permanent disadvantages (bad requests/ DoS attacks and so on). Example: KnowYourStack.com ...

  • image1489-570x194.png
    „Sign in with Twitter“ for your own ASP.NET WebApp

      “Sign in with Twitter” is a popular practice to authenticate the users on your website. One advantage compared to an own registration is the lower inhibition for the user. But on the other hand Twitter doesn’t fess up with all the information’s and you will get into a kind of addiction. At the end ...

  • image1485-570x194_thumb.png
    CodePlex is going to be updated

      CodePlex the Microsoft Open Source Project Hosting Plattform hasn’t changed that much in the last few years and for a few times I thought Microsoft stopped the whole developing process. But now I found out that there is still life in the project. Maybe it is because of the success of GitHub or because ...

  • image1474_thumb.png
    What does Adobe in the flash-free web? Magazine-Style Layouts with CSS Regions!

      Adobe is well known for Photoshop and Flash but of course there is a lot more. According to the “Future Post” from Google Adobe declared one of their big subjects on a Blogpost. I’m talking about the W3C Working Draft to CSS Regions. Adobe cooperates with the WebKit Team and W3C on this. What ...

Support us