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
632
votes
31 answers

"The certificate chain was issued by an authority that is not trusted" when connecting DB in VM Role from Azure website

I am experiencing an error when connecting MY DB which is in VM Role (I have SQL VM Role) from Azure Website. Both VM Role and Azure Website are in West zone. I am facing the following issue: SqlException (0x80131904): A connection was successfully…
ZafarYousafi
  • 8,640
  • 5
  • 33
  • 39
246
votes
10 answers

What is the difference between an Azure Web Site and an Azure Web Role

What are the material differences between the new Azure Web Sites and the traditional Azure Web Roles for an ASP.NET MVC application? What reason would I choose a "web site" over a "web role" or vice versa? Let's assume that I would need equal…
Erv Walter
  • 13,737
  • 8
  • 44
  • 57
118
votes
4 answers

In Windows Azure: What are web role, worker role and VM role?

The application I work on contains a web role: it's a simple web application. I needed to host the application in Windows Azure, so I created a web role. I actually want to know what these roles are for. What is their significance coding wise or…
67
votes
6 answers

how to get blob-URL after file upload in azure

I'm trying to connect web and worker role. So i have a page where user can upload video files. Files are large so i can't use the query to send files. That's why i'm trying to upload them into the Blob Storage and then send the url by the query. But…
Stasy Concelgoger
  • 696
  • 1
  • 5
  • 10
56
votes
11 answers

Windows Azure - The current service model is out of sync

When I run a Windows Azure web role on my local developer fabric, I get the following error: The current service model is out of sync. Make sure both the service configuration and definition files are valid.
Tariq
  • 1,449
  • 2
  • 14
  • 17
26
votes
4 answers

Does Azure offer https for "cloudapp.net"?

One great advantage of using Azure Websites is that I can get secure HTTP (HTTPS) without doing nothing: I simply type https://xyz.azurewebsites.net and it works. I don't have to worry about certificates because I use the subdomain that Azure gives…
sports
  • 7,851
  • 14
  • 72
  • 129
25
votes
2 answers

What's the optimal "Dynamic IP Restriction Settings" in IIS8

So I have turned this on in my Azure cloud service site to try mitigate spiders and bots hitting us an absurd amount of times. Has anyone had any experience with these settings? Deny IP address based on the number of concurrent request: Maximum…
dimoss
  • 1,506
  • 2
  • 16
  • 24
24
votes
6 answers

Disable IIS Idle Timeouts in Azure Web Role

To prevent AppPool recycling every 20 minutes, I'd like to remove IIS AppPool Idle Timeouts when my Azure Web Role starts. My website is a Web Application Project. How do I do this?
Albert Bori
  • 9,832
  • 10
  • 51
  • 78
22
votes
4 answers

How does Microsoft Azure handle Session State?

Does anyone have any information on how state is managed in Azure when you choose to have multiple instances? It seems like InProc would be worthless and you would have to have another state server instance, or use the datastore to store the…
Arron S
  • 5,511
  • 7
  • 50
  • 57
20
votes
2 answers

Azure Web Role "warm up" strategies

I found that making requests to our web role after periods on inactivity would result in a very slow request (up to 30 seconds). After that initial request, the role would perform as it should. After much Googling, I came across four different…
Dave New
  • 38,496
  • 59
  • 215
  • 394
19
votes
4 answers

Multiple roles on the same instance in Windows Azure

Is it possible to deploy multiple roles in the same instance? I have three web roles (website in asp.net mvc3, and two WCF services instances) and two worker roles (windows services). The load for this application is very small, so I don't want to…
Yaplex
  • 2,272
  • 1
  • 20
  • 38
18
votes
2 answers

The correct way to delete and recreate a Windows Azure Storage Table = Error 409 Conflict - Code : TableBeingDeleted

Im really new to Windows Azure development and have a requirement to store some data in a windows azure storage table. This table will really only exist to provide a quick lookup mechanism to some files which are located on azure storage…
Kramer00
  • 1,167
  • 3
  • 12
  • 34
18
votes
1 answer

Deploy PDBs on an Azure Web Role

I have a project that is deployed via a VS 2012 Azure Project (from right in VS, not manually). The web role project is set to build "pdb-only" Debug Info in release mode, but when deploying the PDBs are not packaged and copied to the web role VM…
pbristow
  • 1,997
  • 4
  • 26
  • 46
17
votes
2 answers

How to add a custom post deployment script to azure websites?

My problem is that I need to run a custom cmd file after the build. Instead of modifying the deployment scripts I just want to run few MSDOS commands to my deployment easily. The task I need to do is to run a cmd at the repository located at…
regisbsb
  • 3,664
  • 2
  • 35
  • 41
16
votes
3 answers

ASP.NET session state provider in Azure

As far as I know, the current situation is this: Use SQL session state provider is possible (as I've read somewhere) but it's not supported by Microsoft. So it could stop working in the future. Also it needs a WorkerRole to delete the outdated…
vtortola
  • 34,709
  • 29
  • 161
  • 263
1
2 3
75 76