In this article, we will learn, how to create a basic “Hello World” Cloud Service, using Visual Studio.

Open Visual Studio (I am using VS 2013) and select “Azure Cloud Service” template under the “Cloud” templates in the “New Project” Window, as shown below-

Cloud

Provide a meaningful name to the project. In this case, I gave “HelloWorldCloudService”, as shown above.

Click “OK” in the “New Project” dialog box, which will open “New Microsoft Azure Cloud Service” Window, as shown below-

New Project

In this example, we have selected the following two roles.

  • Web Role
  • Worker Role

Let’s change the names of the roles to something meaningful.

Hover mouse on the role in “Microsoft Azure Cloud Service solution” Window, as shown below-

Microsoft Azure Cloud Service solution

You will see two icons (1) Edit icon and (2) Delete icon. Click “Edit” icon, which will allow us to edit the name of the name, as shown below-

Edit

Provide the required name and click OK button in “New Microsoft Azure Cloud Service” Window. This will open up another Window “New ASP.NET Project”, as shown below-

empty

For this example, to make things simple, I have selected the following.

  • Select a template – Empty.
  • Add folders and core references for – Web Forms.
  • Authentication – No Authentication.

Now, click on “OK” button in the “New ASP.NET Project” window to create the Cloud Service project.

As shown below, the Cloud Service project is successfully created.

Cloud Service project

Visual Studio has created the following three projects-

  • FrontEnd.Web.
  • HellowWorldCloudService.
  • WorkerRole1 (You would provide a meaningful name, even for this in your projects).

As shown below, in Solution Properties, the Cloud Service is the “Startup Project” for this solution.

Startup Project

If you remember, we have created an “Empty” Application. Let’s add a sample page to our Web Application, as shown below-

Empty

web form

As shown below, Default.aspx page is created.

Default.aspx

I just added the text “Hello Cloud World!!!” text to Default.aspx page.

code

Let’s execute the Application by clicking “Ctrl + F5” in Visual Studio.

The steps taken by Visual Studio are given below to create Microsoft Azure Debugging Environment.

  • Initialize the Microsoft Azure Storage Emulator, as shown below-

    Initialize

  • Deploying the Service package to the Microsoft Azure Compute Environment is given below-

    Deploying

  • Starting the roles for the Application in Microsoft Azure Compute Emulator is shown below-

    Starting

    output

That’s it, we have created and deployed the “Hello Cloud World” Cloud Service to local Cloud Emulators.