Dynamically change azure configuration (.cscfg) values

1k Views Asked by At

I'm having azure worker role project. below is a code from my configuration (.cscfg).

c# (FLAG = 1;) Through c# code i want to change this value.

Is there any way for dynamically changing value of an azure service configuration?

Please instruct me how to do it.

1

There are 1 best solutions below

2
On

Simple answer is that you can't change the value of just one setting through code as RoleEnvironment class only exposes a Get method and there's no Set method.

A convoluted approach would be to invoke Service Management API, read the configuration settings file using Get Deployment operation, change the XML file and the call Change Deployment Configuration operation. Not sure how this would work out if you're changing the configuration from the same role though.