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

Credentials rejected by remote desktop to Windows Azure Web Role

I have created a Cloud project on VS 2012 with .net 4.5. This consists of two web roles, an API and an front end website. I have followed the instructions here: http://msdn.microsoft.com/en-gb/library/windowsazure/gg443832.aspx in order to set up…
beyond-code
  • 1,423
  • 1
  • 12
  • 20
5
votes
1 answer

Intermittent Azure Emulator Error: Could not load file or assembly 'XX' The filename or extension is too long.

Using Visual Studio 2012 Premium SP1 11.051106.01 and Emulator version 1.8 I get the following error about ever 3-5 page refreshes. I then have to stop debugging and re-deploy to the emulator. I have at least 5 developers working on Azure and they…
MattPII
  • 256
  • 3
  • 6
5
votes
1 answer

Azure - System startup task failed with exit code -532462766

I recently added Azure Caching to my web role, and on redeploy the instance hang in the following status for about 30 minutes: Busy (Waiting for role to start... System startup tasks are running. [2013-01-25T17:12:53Z]) and then get System startup…
AnsleyGal
  • 111
  • 7
5
votes
1 answer

How to store asp.net session state in SQL Server for Asp.Net MVC 4 application or WebRole application?

How do I store session state in SQL Server for Asp.net mvc4 or Windows Azure Web Role application? Edit Why do I get this error? HTTP Error 500.23 - Internal Server Error An ASP.NET setting has been detected that does not apply in Integrated…
Joe.wang
  • 11,537
  • 25
  • 103
  • 180
5
votes
1 answer

How can I detect clock skew among nodes in Azure roles?

I have a time sensitive operation that needs to be aware of clock skew among other computers, and /or guard against such a thing. How can I detect or guard against clock skew? In my case I'm writing a compressed datetime stamp to Azure Blob. It…
makerofthings7
  • 60,103
  • 53
  • 215
  • 448
5
votes
3 answers

Azure Service Bus - Two Way Communication Performance Challenge

I need to establish a two-way communication between a Publisher and a Subscriber. This is to facilitate a front-end MVC3 application defining a Subscription with a Correlation Filter, and then placing a message onto a Topic. Finally, the MVC3…
5
votes
2 answers

How do I know if my Azure role instance VM was restarted?

I have an Azure web role. Sometimes it will get recycled due to an exception or due to an OS update. This will or will not include a VM restart. I want to know whether the VM was restarted or it was just the host process WaIISHost.exe restarted. How…
sharptooth
  • 167,383
  • 100
  • 513
  • 979
5
votes
1 answer

Azure Web Role - Long Running Request (Load Balancer Timeout?)

Our front-end MVC3 web application is using AsyncController, because each of our instances is servicing many hundreds of long-running, IO bound processes. Since Azure will terminate "inactive" http sessions after some pre-determined interval (which…
Pittsburgh DBA
  • 6,672
  • 2
  • 39
  • 68
5
votes
1 answer

Defining Scaling Threshold for Azure Web Roles

Azure embraces the notion of elastic scaling and I've been able to acheive this with my Worker Roles. However, when it comes to my Web Roles (e.g. MVC Apps) I am not sure what to monitor (or how) to determine when its a good time to increase (or…
JoeGeeky
  • 3,746
  • 6
  • 36
  • 53
5
votes
2 answers

Windows Azure cannot perform a VIP swap between deployments that have a different number of endpoints

I'm trying to perform a VIP swap via the azure portal and I'm getting the error: Windows Azure cannot perform a VIP swap between deployments that have a different number of endpoints. I looked closer and I DO see difference in # of endpoints (2 in…
DeepSpace101
  • 13,110
  • 9
  • 77
  • 127
5
votes
1 answer

Default OS family for the deployment

We have a web app migrated to Windows Azure. It is being deployed from inside the Visual Studio 2010 with the latest Azure SDK installed. Everything works fine except for the fact that we have some dependencies on Windows Server 2008 R2 and I need…
Sergey Rybalkin
  • 3,004
  • 22
  • 26
5
votes
4 answers

Windows Azure Web-Role Caching (Preview) "hangs" makes the emulator stuck in deploy loop

I'm trying to replace the Windows Azure AppFabric Cache with the newly released Role-based caching that was introduced in the June 2012 SDK release by following the guides on Microsoft's website. However, when checking the "Enable Caching (Preview)"…
Andre Andersen
  • 1,211
  • 1
  • 11
  • 19
5
votes
3 answers

Webrole is not starting and always busy

I am working on a Azure Web application. The code compiles and runs fine on my local machine. But when I upload the package in Azure Platform, the webrole wouldn't start and gives Busy status with the message: "Waiting for role to start... System is…
Anil Maddala
  • 898
  • 16
  • 34
4
votes
2 answers

Point with N sub domains to one WebRole in Azure

Currently I'm trying to port a web application(ASP.NET MVC) to windows azure and have come across a point, I don't know how to solve. The application is a multi tenant one. Every customer who registers, can enter a name for his instance and is able…
yan.kun
  • 6,820
  • 2
  • 29
  • 38
4
votes
1 answer

Windows Azure Web MVC app Application_Start rerunning after no activity

I have a Windows Azure hosted MVC3 application. In the Application_Start, I call all of my bootstrappers that need to run before the application loads and that is working great. One of the bootstrappers that runs, hits up some web service APIs to…
Jeff Treuting
  • 13,910
  • 8
  • 36
  • 47