Search code examples
azureazure-web-rolesazure-worker-rolesazure-cloud-services

Can I host WebRole and WorkerRole in same CloudService?


I have a blank Solution in .Net and add two Azure Cloud Services project in solution. One with WebRole and other with WorkerRole. Can I host the both project in one cloudservice instance or need separate for both.


Solution

  • Within a single cloud service, you may certainly have multiple roles, a combination of web and worker roles, each with their own specific projects within your Visual Studio solution.

    When you deploy, you'll have yourapp.cloudapp.net with all of your roles (at least one instance of each).

    Your question is a bit unclear about what you're looking for, regarding solutions and project. But... All roles which must coexist within a .cloudapp.net deployment must all be within a single Visual Studio solution. You cannot combine roles from multiple Cloud Service solutions.