Questions tagged [azure-role-environment]
54 questions
12
votes
4 answers
Detecting if a .NET app is running in Azure or on a non-Azure environment
We are currently moving some instances of our application to Azure, but will still maintain backwards compatibility with existing instances which are not Azure hosted.
Is there a good way to detect the environment without installing the SDK on the…

Ross Vernal
- 483
- 1
- 5
- 20
10
votes
3 answers
Azure Autoscale Restarts Running Instances
I've been using Autoscale to shift between 2 and 1 instances of a cloud service in a bid to reduce costs. This mostly works except that from time to time (not sure what the pattern seems to be here), the act of scaling up (1->2) causes both…

Nariman
- 6,368
- 1
- 35
- 50
7
votes
1 answer
Azure Role Environment not initialising
My project has suddenly stopped working. I am using local storage and when I try to initialise the role environment, it says:
"Microsoft.WindowsAzure.ServiceRuntime Error: 102 : Role environment . FAILED TO INITIALIZE"
and an SEH exception occurs…

StevenR
- 435
- 1
- 6
- 16
5
votes
3 answers
Can Windows Azure roles detect which datacenter the roles are in?
Our Windows Azure roles need to know programmatically which datacenter the roles are in.
I know a REST API ( http://msdn.microsoft.com/en-us/library/ee460806.aspx) return location property.
And if I deploy to, let’s say, West US, the REST API…
user1385956
4
votes
2 answers
What minimum role is required to see Azure Function in portal?
I'm a dev. I have
WEBSITE CONTRIBUTOR
Role on my azure function that our infrastructure team created. I can't see any functions listed in my function app in the portal and this ajax request fails when I try to expand the functions list in the…

cobolstinks
- 6,801
- 16
- 68
- 97
4
votes
0 answers
RoleEnvironment Changed Event not firing in non-default AppDomain
I'm running an Azure service that host code in separate AppDomains. I need to handle service configuration changes in these AppDomains. For this purpose I'm listening to the RoleEnvironment.Changed event.
However, this event is only fired in the…

Mårten Wikström
- 11,074
- 5
- 47
- 87
4
votes
1 answer
Got RoleEnvironmentException in Azure when accessing RoleEnvironment.IsEmulated
After i have deployed my ASP.NET WebRole to Azure and looked into the Azure Intellitrace i noticed a lot of RoleEnvironment Exceptions and they are occuring at RoleEnvironment.IsEmulated.
I thought there is something missing in ServiceConfiguration…

HeManNew
- 233
- 2
- 10
3
votes
2 answers
Detect Azure Stage or Production by Microsoft.WindowsAzure.ServiceRuntime
I know this question has been asked before, like this one. But they all very old, the method is very complex and I tried cannot really get it work. So I wonder if the new Azure SDK gives something easy, I guess should from…

Eric Yin
- 8,737
- 19
- 77
- 118
3
votes
2 answers
Detect when *last* role instance shuts down on Azure
I know that there's RoleEnvironment events for detecting when a role instance is shutting down or starting, but, is there a way to detect when the last role instance shuts down? (i.e. the entire role is shutting down)
I realize this will not be…

David Pfeffer
- 38,869
- 30
- 127
- 202
3
votes
2 answers
The type initializer for 'ServiceRuntime.RoleEnvironment' threw exception
I have custome azure utility dll that has one method to read configuration values from ServiceConfiguration and also has fallback code to read from AppSettings from web.config in case RoleEntironment is not running .
This DLLs works fine with Azure…

sudhirk
- 423
- 1
- 5
- 12
3
votes
2 answers
Unable to query RoleEnvironment with Windows Azure SDK for PHP
I have an issue with obtaining data from Windows Azure's runtime using the newest (at the time of writing) PHP SDK from Github. Here is a test I am running on one of our hosted services:

jonnu
- 728
- 4
- 12
2
votes
1 answer
How to add/update user permissions on environment's security through REST API on Azure DevOps?
I need to add user permission when creating an environment through REST API with PowerShell.
I've looked at the network trace and this is the header when I tried to manually add a user permissions
Request…

Jess
- 29
- 7
2
votes
1 answer
Least Priviledge Role to start/stop vm in Azure
is there any standard role that give privileges to start/stop Virtual Machines in Azure resource group without give also creation privileges or privileges to modify existing resources? I didn't found one in the documentation, the only solution is…

NxA
- 159
- 1
- 12
2
votes
3 answers
Instance roles for Azure vms
Basically I'm trying to implement with Azure the following AWS pattern:
Assign an IAM role to an Vm (Aws instance equivalent)
Allow this role to access a certain container (AWS bucket equivalent) as read only and download from there
How it this…

alonisser
- 11,542
- 21
- 85
- 139
2
votes
1 answer
Azure Emulator Won't Accept D-Series Role
If I try to debug an Azure project using the new D-Series sizes, I get an error saying that the Specified argument was out of the range of valid values. I'm using the latest 2.4 tools. Is there a way around this or do I have to wait for…

AdamC
- 16,087
- 8
- 51
- 67