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
3
votes
4 answers

How many users a single-small Windows azure web role can support?

We are creating a simple website but with heave user logins (about 25000 concurrent users). How can I calculate no. of instances required to support it?
B. Vijay
  • 31
  • 1
  • 2
3
votes
0 answers

Azure web role suddenly not starting

I have Web Application that was hosted in azure web role the application worked well suddenly the application stopped working it won't started but in cloud service it show running status. I login azure web role in remote desktop and check it in…
parthicool05
  • 255
  • 1
  • 10
3
votes
0 answers

Entity Framework 6.1 Slow on 'Cold Start' Only When Running in Azure Cloud Service

While I found that EF Code First is known to be slow on cold starts after following many suggestions I have my cold start time down to about 2 seconds locally. I actually have a very simple 6 table\model DbSet. Using an on-prem database and after…
Mikee
  • 1,571
  • 2
  • 14
  • 24
3
votes
1 answer

diagnostics not working in web role for Azure SDK 2.5.1

I am working with Azure SDK 2.5.1, mainly on the new designed diagnostics stuffs. However, I found I cannot get it run for my web role. So, I created a cloud service project, added a web role. Then, I appended one Trace message at the end of…
3
votes
3 answers

Is it possible to change vmsize of a running web role using powershell

I would like to change the vmsize of a running Azure web role during deployment preferrably using powershell. Is this at all possible? The use case here is that not all of our customers (and test environments) should run the same vm sizes, but they…
3
votes
1 answer

Confused with web / worker roles and instances in windows azure.

I am new to Windows Azure and confused about web / worker roles and instances. I plan on deploying a web application that uses WCF services for the back end. I have a few questions: Am I correct in saying that I need one web role to host the web…
Cool Breeze
  • 1,289
  • 11
  • 34
3
votes
2 answers

Web role failing to start because dependent assembly cannot be loaded

I encountered a strange issue with the startup of web roles. The full repro is quite complex, but I managed to find the root cause so I will put the simplified steps. My webrole project depends on AssmeblyA which in turn depends on AssemblyB,…
dennis
  • 562
  • 6
  • 21
3
votes
2 answers

Is it possible to host a WCF service in an Azure WebRole (MVC)

Is it possible to host a WCF service in an Azure WebRole (MVC)? Also; I assume that net.tcp is not supported.
detroitpro
  • 3,853
  • 4
  • 35
  • 64
3
votes
1 answer

Can Azure Web/Worker Roles Support .NET Framework 4.5.2 Yet?

Yes, similar questions have been asked before: Azure Websites, Can one deploy .NET 4.5.2 websites However, the questions are approaching a year old, and the answers are incomplete. The (cloudy, no pun intended) answer seems to be that 4.5.2 should…
Colin
  • 4,025
  • 21
  • 40
3
votes
1 answer

Azure websites RoleEnvironment.IsAvailable equivalent

I'm migrating an web app from an Azure Cloud Services Web Role to Azure Websites. Websites can't find Microsoft.WindowsAzure.ServiceRuntime and doesn't seem to like the Cloud Service helpers in general. The app uses RoleEnvironment.IsAvailable in a…
Edward Brey
  • 40,302
  • 20
  • 199
  • 253
3
votes
0 answers

How to Ping a external IP from Azure cloud server

I created a startup command and already off the firewall using below: netsh advfirewall set allprofiles state off My object is to communicate our server from our application which already hosted as a Azure cloud service. Initially i want to execute…
3
votes
2 answers

Deploying WebRoles to pre-existing VMs

We have developed and tested our webroles in our Free trial Azure cloud. We now have to deploy the webroles to Company A Azure cloud. Company A is open to creating IIS VMs for our deployment but will not share username/pwds with us to publish our…
3
votes
1 answer

Refresh Validation Settings stopped working

I use the following code inside my application Application_Start section. This updates the web.config with the latest token and is used in all the tutorials for Azure AD consuming apps. My app, which has been running happily, has now failed to…
Steve Newton
  • 1,046
  • 1
  • 11
  • 28
3
votes
2 answers

How to configure Anti Malware for cloud Services

Is there a way to enable Anti-malware monitoring of cloud service. With the latest release for enabling cloud service, should we still need to have power shell has start up for cloud Services and Power-shell will invoke XML template of anti malware.…
user145610
  • 2,949
  • 4
  • 43
  • 75
3
votes
1 answer

Using the Webjobs SDK in a Web Role

We have an Azure Web Role that needs to monitor a Service Bus Queue for responses to earlier requests (which will then be transmitted to the client via SignalR). At first we wanted to use a message pump (QueueClient.OnMessage) in the…