Adding Cloud Service project to existing ASP.Net Web Application
Imagine we are moving existing Web Application or ASP.Net MVC Web Application to cloud. In that case we need to add cloud service to existing Web Application or ASP.Net MVC Web Application.
We have a solution for Web Application is as below,
Now right click on the solution and add a new project in the same solution. Choose Windows Azure project from the installed template and then choose a ASP.Net Web Role.
In role selecting window do not select any role and click on Ok. See the image below,
Now you can see in solution explorer, Windows Azure project is being added.
After creating Windows Azure project we need to associate ASP.Net Web Application project to Window Azure. So to do so, Right click on Roles in Windows Azure Project and select add and then choose Web Role Project in solution option
Then you will get the project in the solution. Press ok
On clicking of Ok, Visual studio will update csdef and cscfg file for the Web Role.
Now add the references of required windows azure. For that click on web Application project and add references. Then add the below references.
In this way you have added cloud service project to existing Web application.