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
2 answers

Azure global admin cannot(disabled) add roles under "Access Control(IAM)"

I activated my global admin role in Privileged Identity Management like so When I navigate to the Access Control blade under a subscription, I see the Add role assignment options disabled. Doesn't global admin has global rights and can do…
4
votes
2 answers

Why would you want to deploy a Web Service as a Web Role on Azure?

I was under the impression that a Web Service that should be run under a worker role. I just found out that a web service can be setup using the web role. What are the advantages to using one role over the other ?
BentOnCoding
  • 27,307
  • 14
  • 64
  • 92
4
votes
4 answers

Azure compute emulator is not starting and getting stuck at starting roles for the application after windows update

I am developing a WCF application and it is working fine in hosting environment. Now I am facing an issue after applying latest windows updates. Azure computer emulator is not starting, it is getting stuck at starting roles. So it is not possible to…
Prasanth
  • 3,029
  • 31
  • 44
4
votes
4 answers

Scheduling Azure Instances

I'd like to run a single Azure instance on a predetermined schedule (e.g. 9-5 PM EST, Mon-Fri) to reduce billing and am wondering what the best way to go about it is. Two parts to the question: Can the Service Management API [1] be used to set the…
Nariman
  • 6,368
  • 1
  • 35
  • 50
4
votes
1 answer

Azure RoleEntryPoint not called?

I've deployed my solution to an Azure CloudService using SDK version 2.6. The solution is running fine and now I want to configure some IIS settings from the RoleEntryPoint (like keeping the Threadpool always running). Whatever I do, it seems that…
Sparhawk
  • 1,517
  • 1
  • 14
  • 28
4
votes
1 answer

How to change diagnostics storage location per service configuration in Azure SDK 2.5

In Azure SDK 2.5 the storage account is set in the wadcfgx of the role like this :
Ognyan Dimitrov
  • 6,026
  • 1
  • 48
  • 70
4
votes
1 answer

Get Cloud Service Name in a Web Role

We have a requirement of logging Cloud Service Name where Web Role is deployed. We are getting Role Name & Role Instance Id from RoleEnvironment class in Azure ServiceRuntime library. But not finding Cloud Service Name.
Srinivas
  • 2,479
  • 8
  • 47
  • 69
4
votes
1 answer

Downloading encrypted file from Window Azure storage

I have created a MVC WebRole Window Azure application where i upload encrypted files to Azure blob storage using SymmetricAlgorithm (Rijndael) like this Controler>Action is [HttpPost] public ActionResult UploadImage_post(HttpPostedFileBase…
4
votes
5 answers

I am a bit confused about deployment of cloud services, and particular whether just code can be replaced

Just getting used to VS2012 publishing of Cloud Services. At present I have a one instance webrole which contains a MVC3 application. I can publish it to Azure without issue, and it creates the Cloud Service>Web Role>VMs. Fine. Takes a little while.…
SamJolly
  • 6,347
  • 13
  • 59
  • 125
4
votes
1 answer

Scale-out Node.js with Socket.io on Windows Azure

I followed the "Build a Node.js Chat Application..." post which shows step by step how to deploy Node.js application with Socket.io to provide real-time chat webapp. The only thing missing is showing how to scale-out this application, as I found…
Guy Korland
  • 9,139
  • 14
  • 59
  • 106
4
votes
1 answer

Multiple sites within one Azure WebRole

Goal:This is all about paying for one WebRole instance but demoing/testing multiple sites what are completely independent VS projects (ASP MVC 5, but this must not matter). Sites are differentiated not by port number instead domain (host) name)…
g.pickardou
  • 32,346
  • 36
  • 123
  • 268
4
votes
1 answer

Azure website - Attach storage (blob) and ftp to that storage

I am using Azure to host my asp.net website as WebSite which allows user to fetch files. There is a limit of 1 GB on the website so I have to attach storage to that website. My problem is that I want to hook that storage with WebSite and…
Ankit
  • 6,388
  • 8
  • 54
  • 79
4
votes
1 answer

Azure Cloud Service redirect http to https not working (tried answers on many links)

I'm trying to do the 'simple' task of redirecting/rewriting traffic from http to https, I have one endpoint in a CloudService which is correctly configured for SSL. I've tried many IIS rewrite rules, like the one below, but none are working. I've…
sham
  • 1,346
  • 1
  • 20
  • 28
4
votes
1 answer

Struggling to move Web Role to a smaller vmsize

I want to move my web role to a smaller VM size for cost saving purposes. I changed the vmsize attribute in WebRole in the ServiceDefinition.csdef accordingly. On publishing I received the following error: Total requested resources are too large…
Dave New
  • 38,496
  • 59
  • 215
  • 394
4
votes
2 answers

Implementing a scalable node.js-like HTTP server with c# and .net

I'm working on Azure cloud and trying to implement a scalable HTTP server which is primarily IO-bound. Clarification: To have an example at hand, assume the server is a "blob proxy" - meaning a client connects, the server downloads a blob from Azure…
talkol
  • 12,564
  • 11
  • 54
  • 64