2 Web Applications on One Cloud Service

Category: azure development


David Brosnan on Fri, 05 Dec 2014 03:40:33


I know there is information out there on this because I have come across it before, but unfortunately I cannot find it now so I will ask the questions here. I see a post about running applications on different ports within a cloud service, I am not sure if that is the same thing that i am talking about.

Anyway, here is my question.

- Can I run two web applications in one cloud service?
- If I can, is it possible to update each web application separately or do I need to do a full deployment each time one of the web applications needs to be updated.
- If I can, is it possible to have two different domain names for each web application within the application?

If all that is possible, how do i do it? In Visual Studio, do i just right click my solution and click add new project, and then just deploy.

Many thanks in advance for any comments or feedback.



Nithin.Rathnakar on Fri, 05 Dec 2014 06:06:02

 Thanks for Posting.
 By using the Sites element within the service definition file, ServiceDefinition.csdef, you can configure your web role to support multiple websites and web applications. This is accomplished using the sites, applications, and virtual directories features in Internet Information Services (IIS) 7.0. These features enable each web role in Azure to support configuration for multiple websites and applications.
 Refer to the Following article for more information : http://msdn.microsoft.com/library/azure/gg433110.aspx

Bhushan Gawale on Fri, 05 Dec 2014 08:23:07

Yes, you can run multiple web applications on a single web role. 

Read more about it at - http://www.wadewegner.com/2011/02/running-multiple-websites-in-a-windows-azure-web-role/

About deployment, you wont be able to update your web applications individually as you will need to upgrade your entire service with deployment package.

About domain names, as mentioned in the article - http://msdn.microsoft.com/en-us/library/azure/gg433110.aspx

If you must host different websites on one web role with several users, you should use the VM role and configure the IIS isolation boundaries that are necessary to provide appropriate security for each site.