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

Windows Azure, addressing instances and sticky sessions

For a proof of concept paper, I collected facts about Windows Azure. There are 2 topics remaining I could not find a definitive answer for. Sticky sessions/sticky load balancing is not possible, am I right? Maybe there is a possibility with the…
alapeno
  • 2,724
  • 6
  • 36
  • 53
5
votes
4 answers

Conflicting versions error adding ASP.NET MVC 3 Web Role to Windows Azure project

I am getting the following error creating a new project after installing Windows Azure Tools 1.4: Conflicting versions of ASP.NET Web Pages detected: specified version is "1.0.0.0", but the version in bin is "2.0.0.0". To continue, remove files…
Danny
  • 2,771
  • 5
  • 30
  • 42
5
votes
2 answers

Can I access web.config from my Azure web role entry point?

I have an Azure web role and I want to store some settings in web.config under tag. Yes, I'm aware of service configuration files, yet I have reasons to prefer web.config. When I execute (from here): System.Configuration.Configuration…
sharptooth
  • 167,383
  • 100
  • 513
  • 979
5
votes
3 answers

What starts first Application_Start or WebRole's OnStart?

I have MVC project on Windows Azure. This project has WebRole with method OnStart. And I want to know what starts first Application_Start of Global.asax or WebRole's OnStart?
Pavel F
  • 750
  • 4
  • 13
  • 23
5
votes
1 answer

Getting the name and location of the deployment the webrole belongs to

I want to be able to get the name (named when the hosted service was created) and the location (North Europe, Asia Anywere, etc) of the deployment from within a running web role. I don't want to rely on a certificate and the subscription ID.…
5
votes
1 answer

Webrole - Multiple hostHeader on a single Binding?

Is it possible in Azure to have multiple hostHeader on a single Binding or is it mandatory to create one Binding for each hostheader ? Example : ...
kdstack
  • 197
  • 2
  • 11
5
votes
3 answers

Azure - Extra small instance web role - ready for production?

I'm planning for a website running in Azure. I'm estimating max. 2000 users a day creating about 20.000 hits. I know I'm kinda vague here, but is the extra small instance ready for this kind of site? I'm using MVC 3 to create the site. Thanks for…
kay.herzam
  • 3,053
  • 3
  • 26
  • 37
5
votes
3 answers

How to have RoleEntryPoint.OnStop() called in Azure Compute Emulator?

I'm testing a trivial web role under Azure Compute Emulator and have overridden OnStart(), Run() and OnStop() methods in my class that derives from RoleEntryPoint. OnStart() and Run() are called but OnStop() is not - I will either press "Stop…
sharptooth
  • 167,383
  • 100
  • 513
  • 979
5
votes
2 answers

Azure: Intra-WebRole Communication (netTcpBinding) with Full-IIS

I need to change some configuration settings on-the-fly in a Windows Azure project - and they need to be changed via a web service call (updating the application's configuration either via the platform api or the Azure Management site isn't an…
Steve
  • 31,144
  • 19
  • 99
  • 122
5
votes
4 answers

How do I import a public certificate to Windows Azure?

I am going to communicate from Windows Azure to another public web service through SSL. And the certificate on public web service is self-signed. Therefore I need to trust the public certificate on my Windows Azure. How can I import the certificate…
Wayne
  • 681
  • 1
  • 6
  • 14
5
votes
3 answers

Number of instances needed for windows azure application

I'm fairly new to Windows Azure and want to host a survey application that will be filled out by appr. 30.000 users simultaniously. The application consists of 1 .aspx page that will be sent to the client once, asks 25 questions and will give a…
5
votes
1 answer

Deploying Azure Web Role Failing. value cannot be null

I have a number of web applications live in azure, all web roles. All have been published many times before, but when I try to publish any of them now, I am getting a failure. The feedback is: Value cannot be null, Parameter name: s. I think this…
mjnorrie
  • 53
  • 4
5
votes
0 answers

Does cspack.exe support .NET 4.6*?

According to Support and Retirement Information for the Azure SDK for .NET and APIs, SDK 2.6 introduced support for .NET 4.6. None of the listed SDKs explicitly mention 4.6.2 though the sister article Install .NET on a Cloud Service Role includes an…
David Peden
  • 17,596
  • 6
  • 52
  • 72
5
votes
1 answer

Azure web-role not starting in Azure Emulator

I upgraded my development machine from Windows 7, VS2012 to Windows 10, VS2015. This requires upgrading to Azure SDK 2.8. Our web-role no longer starts. A browser window opens and the below are last lines Debug outpu. I have searched for a log…
andrewkittredge
  • 742
  • 5
  • 12
5
votes
3 answers

Updated to VS 2015, Azure 2.7, publish fails 'Access to path ... denied'

I have a cloud service project with three worker roles. Previously (VS 2013, Azure 2.5) everything published fine. When VS 2015 was available, I installed it on a clean VM and then installed Azure 2.7. I promoted my old solution and I can build and…