Adding Existing Web Application To Cloud Service

Step 1

Open Visual Studio and navigate to your Web Application, as shown below-

Web Applicatio

Step 2

Now, right click on the project and click “Convert” >> “Convert to Microsoft Azure Cloud Service Project”, as shown below-

Convert

Step 3

Clicking on convert button will actually add a new Azure Cloud Service project.

Project

Step 4

It also adds the required libraries to the bin folder and adds the references to the project.


Now, click Ctrl + F5 to execute the Application. As shown below, it executes the Web Role and displays the output in the Web Browser.

Browser

Step 5

You can also add additional Web Role to the same Azure Cloud Service project, if required. Right click on the Roles folder, located in Azure Cloud Service and select Add, if there is New Web Role Project, as shown below-

Project

Step 6

Click “New Web Role Project” will open up the Window, given below, where you can select the type of Role, which you would like to add to the project.
 
New Web Role Project

Step 7

In this example, I have chosen a Web Role. I provide it with a name and click “Add”, which opens the Window, given below, where I need to select the type of Web Application for the Web Role.

Add

Step 8:   After selecting the required application, click “OK” button to create the project, as shown below-

create

Step 9

You can now execute the Application program.