Questions tagged [azure-web-roles]

A Microsoft Azure Web Role is a Windows Server Compatible Virtual Machine (VM) with IIS enabled, along with scaffolding code that provides a launch point for your own code to run within the VM.

Web Roles and Worker Roles form the basis of the Azure Cloud Services PaaS offering, removing the need for developers to manage the platform on which their applications will run.

The primary difference between a Web Role and Worker Role is the enabling of IIS. Both Web Roles and Worker Roles may run the same code, though it's often useful to split code between different roles for scaling purposes.

Within Visual Studio, you'll also see a slightly different role template, but the 4 primary events/overrides are available in both:

  • OnStart()
  • Run()
  • Stopping()
  • OnStop()

Further: If apps need to be installed (or registry changes are needed), and those tasks need elevated privileges, there's the ability to run startup tasks, which execute prior to OnStart().

In either roles you can choose the type of operating system running by modifying the service configuration file (.cscfg). Possible options are:

  • osFamily 1: equivalent of Windows Server 2008 SP2 x64
  • osFamily 2: equivalent of Windows Server 2008 R2
  • osFamily 3: equivalent of Windows Server 2012
  • osFamily 4: equivalent of Windows Server 2012 R2

You can read more about service configuration schema here.

1139 questions
4
votes
1 answer

How to Connect Azure Worker/Web role to Azure Iaas VMs without using public IP's?

We want to run MongoDB and some custom services on Azure Iaas VMs and connect to them with our roles but we do not want to have public IP exposure on the VMs. If possible what is the best way of doing this? If not possible is this on the roadmap? We…
4
votes
1 answer

Structuring Azure solution with multiple roles

I'm curious how others have structured (or suggest structuring) Azure applications that have multiple roles. In particular I'm curious about how you have them broken our between Subscriptions and Hosted Services. In my particular case we have a web…
Brian Reischl
  • 7,216
  • 2
  • 35
  • 46
4
votes
1 answer

azure webrole Global.Application_Start is never called

I created a simple ASP.NET project and then added cloud deployment descriptor using Visual Studio. Once I do that, Application_Start() method in global.asax file never gets called. In my project, I do lot of initialization such as loading web.config…
phebbar
  • 265
  • 1
  • 3
  • 12
3
votes
3 answers

Wait/Sleep inside Azure WebRole OnStart method

Is it a good practice to Wait/Sleep inside the RoleEntryPoint.OnStart method of a webrole? We want to make sure our service is fully ready before we tell Azure that we are ready to service request.
Prapti
  • 65
  • 1
  • 5
3
votes
5 answers

MachineKey Azure SDK 1.5/1.6

I am using a custom Api Token implementation using WCF Web API on Azure. This uses FormsAuthentication.Decrypt in order to obtain a FormsAuthenticationTicket. To make sure that the decrpyt process works across multiple instances, I have provided a…
Anup Marwadi
  • 2,517
  • 4
  • 25
  • 42
3
votes
2 answers

Incorrect address when service is hosted in Azure

I have hosted a WCF service on Azure at http://voraservice.cloudapp.net/MyPushService.svc. The problem is when I connect through client, it gives me that no endpoint found at the given address: http://rd00155d3425e0/MyPushService.svc I dont know how…
whihathac
  • 1,741
  • 2
  • 22
  • 38
3
votes
2 answers

Windows Azure project without Web Roles?

just starting to explore Azure and I am still a bit confused regarding the purposes of web roles vs worker roles. In the solution I'm working on mobile apps (iPhone, Android, Windows etc) will be accessing our server product via a REST api. So there…
onnoweb
  • 3,038
  • 22
  • 29
3
votes
3 answers

Azure Development - How to stop a Web Role instance

I need to test how my code will handle the failure of a web role instance in a development environment. How do I terminate one of the instances? I can't see any option in the UI for this. Seems like a strange ommission Update The issue is relating…
Andrew Harry
  • 13,773
  • 18
  • 67
  • 102
3
votes
4 answers

approot and sitesroot in Azure

My Azure Web Role needs to be able to delete temporary local files stored in a sub-folder of App_Data. I want to use ICACLS in an Azure elevated startup task to allow IIS to do this as follows: ICACLS App_Data /grant "IIS_IUSRS":(OI)(CI)F However,…
Mister Cook
  • 1,552
  • 1
  • 13
  • 26
3
votes
1 answer

Azure Default Reader vs Built-in Monitoring Reader

I am trying to setup narrow down the best possible role for monitoring data from security perspective. My needs are slightly different so I don't want to use the Security Reader role (mainly because security reader only has access to the security…
3
votes
3 answers

Error when Implementing Interface: class doesn't implement interface members

I am trying to implements the IUpdatable. Error 1 'WebRole1.InfoManager' does not implement interface member 'System.Data.Services.IUpdatable.ClearChanges()' All the errors i get are saying that i am not implementing all interface members, but i…
3
votes
5 answers

Is it possible to run SQL Express within a Azure Web Role?

I am working on a project which uses a relational database (SQL Server 2008). The local (on-premises) application both reads and writes to the database. I am working on a different front end for Azure (MVC2 Web Role), which will use the same data,…
Erick T
  • 7,009
  • 9
  • 50
  • 85
3
votes
1 answer

Slow communications between Azure regions

So just a quick summary of what we are doing to put everything into context. We have a socket server running as an Azure Cloud Service (worker role) within the South Central US region. All of our other components (Queue, DBs, web app, API etc) are…
3
votes
1 answer

Azure webroles recycle after configuration change despite handling the RoleEnvironment.Changing event and setting Cancel to false

When changing some of the configuration settings of a webrole, the RoleEnvironment.Changing event is triggered. As far as I understand it, if Cancel is set to false in the RoleEnvironmentChangingEventArgs, the role should not recycle and the changes…
Sinar
  • 33
  • 3
3
votes
3 answers

Azure traffic manager -IP whitelisting

I have a Azure Traffic Manager over a geo distributed cloud service. I need to lock down my cloud services which are primarily web apis so that they are accessible to only a certain range or IP ADDRESSES. Is there a way to achieve this? Or may be…
Hari Subramaniam
  • 1,814
  • 5
  • 26
  • 46