azure Windows https://www.programmerfish.com/category/windows-azure-microsoft/' target='_blank'>Azure has the easiest cloud web application development environment among all the cloud services in the market right now.

Right now Windows https://www.programmerfish.com/category/windows-azure-microsoft/' target='_blank'>Azure is in Community Test Preview and for deployment of your application on cloud in this tutorial, you must have a Windows https://www.programmerfish.com/category/windows-azure-microsoft/' target='_blank'>Azure account. You can request one by joining Microsoft Connect

In this tutorial I have created a simple “Hello World” application and deployed it on Windows https://www.programmerfish.com/category/windows-azure-microsoft/' target='_blank'>Azure.

image

System Requirements and Setup

You must have the following items to complete this tutorial:

  • Windows Vista SP1 / Windows Server 2008
  • IIS 7 with ASP.NET and WCF HTTP activation enabled
  • Microsoft Visual Studio 2008
  • Microsoft .NET Framework 3.5 SP1
  • Windows https://www.programmerfish.com/category/windows-azure-microsoft/' target='_blank'>Azure SDK 1.0.0 or higher
  • Windows https://www.programmerfish.com/category/windows-azure-microsoft/' target='_blank'>Azure Tools for Microsoft Visual Studio 1.0 or higher

IIS 7.0 with ASP.NET and WCF HTTP Activation

You must enable IIS 7.0 with ASP.NET and WCF HTTP Activation to install and run the SDK. Follow the appropriate set of instructions below to configure these components for your operating system.

Windows Server 2008:

1. From the Start menu, choose All Programs | Administrative Tools | Server Manager.

2. In Server Manager, under Features Summary, choose Add Features.

3. In the Add Features dialog, under .NET Framework 3.0 Features, select the .NET Framework 3.0. Under WCF Activation, select HTTP Activation. Click the Next button to install.

4. In Server Manager, under Roles Summary, verify that Web Server (IIS) appears in the list of available roles. If it does not, click Add Roles to install Internet Information Services.

5. In Server Manager, under Roles Summary, click Web Server (IIS).

6. In the Add Role Services dialog, expand Web Server, then Common HTTP Features. Select Static Content.

7. In the Add Role Services dialog, expand Web Server, then Application Development. Select ASP.NET.

8. Click the Next button to install.

Windows Vista

1. From the Start menu, choose Control Panel | Programs | Programs and Features.

2. Click Turn Windows Features On or Off.

3. Under Microsoft .NET Framework 3.0, select Windows Communication Foundation HTTP Activation.

4. Under Internet Information Services, expand World Wide Web Services.

5. Under Application Development Features, select ASP.NET.

6. Under Common HTTP Features, choose Static Content.

7. Install the selected features.

Tutorial

Start Visual Studio as Administrator.

Go to File>New project. In Project types select Cloud Service and from Templates select Web Cloud Service. In Name Write Myhttps://www.programmerfish.com/category/windows-azure-microsoft/' target='_blank'>AzureApplication and press OK

image

In Solution Explorer, Under Myhttps://www.programmerfish.com/category/windows-azure-microsoft/' target='_blank'>AzureApplication_WebRole Double click to open Default.aspx

Create a UI like this:

image

And press F5 to compile and debug application. When you will press F5, If everything is setup correctly then Development Fabric and Development Storage will start. And you will see the output of your “Hello World” application

image

Deployment on Windows https://www.programmerfish.com/category/windows-azure-microsoft/' target='_blank'>Azure Cloud

In Solution Explorer, right click on Myhttps://www.programmerfish.com/category/windows-azure-microsoft/' target='_blank'>AzureApplication and click Publish

image

When you will click on Publish, The publish folder and Windows https://www.programmerfish.com/category/windows-azure-microsoft/' target='_blank'>Azure Website will open. The publish folder will contain a Service Package File and Cloud Service Configuration file

image

In Windows https://www.programmerfish.com/category/windows-azure-microsoft/' target='_blank'>Azure web site, login using your Windows Live ID

image

At the https://www.programmerfish.com/category/windows-azure-microsoft/' target='_blank'>Azure Services Developer Portal, I have already created an https://www.programmerfish.com/category/windows-azure-microsoft/' target='_blank'>Azure project, If you haven’t created any project, Click on New Project

image

Under Windows https://www.programmerfish.com/category/windows-azure-microsoft/' target='_blank'>Azure, click on Hosted Services to create a Hosted Services project.

image

I have already created a Hosted Services project named WindMill, your project can have any name. So I will click on WindMill to go to my project page.

image

Now under staging, click the Deploy… button and Staging Deployment page will open.

In App Package, select the Service Package File and in Configuration Settings select Cloud Service Configuration file from your project’s Publish folder. In properties type anything as label (for example I typed “HelloWorld”) and click Deploy

image

The project will start deploying in Staging and will take few minutes(sometimes few seconds)

image

After being deployed, the project is ready to run for staging, so click Run

image

Package will start updating…

image

After updating it will start initializing the Webrole

image

As soon your project is deployed, you will see a green icon and Started status. Click on the Web Site URL to test your application on the cloud.

image

And here it is! The project is deployed on Cloud for Staging(Staging is hosted service for testing your applications).

image

Let’s deploy it to Production (that is productive deployment). Click on promotion button (pointed in screenshot)

image

Click OK if a dialog box appears to ask if you want to promote to the production deployment.

image

The project is now completely deployed on Cloud, click on the Web Site URL to see the cloud application

image

Here it is, Completely Deployed on Windows https://www.programmerfish.com/category/windows-azure-microsoft/' target='_blank'>Azure Cloud

image

Download the Solution Files: Myhttps://www.programmerfish.com/category/windows-azure-microsoft/' target='_blank'>AzureApplication.zip