Can sites published to Azure have working roles?

Can I add the worker role to the standard MVC4 website that I host on Azure sites? I have not seen any documentation on how to add a worker role to these deployments.

I hope I don’t need to rebuild the whole project as a cloud project, convert the MVC4 website to a web clip, and then add a new working role ... Is that so? If so, has anyone done this successfully? I have a very large website that I would not want to repackage into a new project.

+6
source share
2 answers

No, but that’s not a problem. You may have the following setting:

  • MyApp.Web (ASP.NET MVC 4 Web Application) → Deploying Windows Azure Websites
  • MyApp.CloudService → Deploy to myapp.cloudapp.net
    • MyApp.Worker (worker role)

You can use Windows Azure websites for your ASP.NET MVC application and create a new cloud service with a worker role for your background jobs.

+5
source

Web roles as well as worker roles are available on Windows Azure Cloud Services. The Windows Azure website does not have operational roles.

However, you can have a Windows Azure Website talking to your work roles through bus services.

I hope I don’t have to rebuild the whole project as a cloud project ...

I don’t know what your application looks like, but web roles are very similar to web applications, so it might be worth exploring a potential change from a standard web application to Azure Web Role.

Azure Web roles provide many benefits, such as role scalability, code deployment management, and more.

Update: Azure websites now support SSL for a custom domain, for more information check the ScottGu ad link.

Update: Laser websites also support scaling.

Also note that Azure Web Sites does not currently support SSL for user domains, which may be a blocker for your application, moving to the cloud.

+2
source

All Articles