How can I test changing Azure service configuration settings at runtime locally?
Asked Answered
C

1

9

I am writing our Azure app to use Azure service configuration settings so we can change it in real time. I can test it by deploying and then changing them in the Azure web portal.

How do I allow changing service configuration in real time on my local azure compute emulator?

Cleopatracleopatre answered 31/8, 2012 at 13:7 Comment(0)
L
15

In order to update the service configuration you need to modify the *.cscfg file and execute csrun.exe (in C:\Program Files\Microsoft SDKs\Windows Azure\Emulator):

csrun.exe /update:<deployment-id>;<service-configuration-file>

Note that this seems to work only when running the application without debugger.

I recently blogged about this here: Controlling your instances in the Windows Azure Compute Emulator (look under Handling the RoleEnvironment.Changing event in the emulator).

Lawley answered 31/8, 2012 at 15:12 Comment(5)
Great. Thanks for that I was totally unaware of it. Now if I could just manage to get my membership connection string stored in service configuration it would be a good week :)Cleopatracleopatre
Sorry for the pile-on. Is there anyway I can change value for just one key in my configuration file from my role itself? My guess is not, but I wanted to make sure of that.Millimicron
@GraemeMiller, I wroted a detailed blog post on how you can store the connection string for your membership provider in the service configuration: fabriccontroller.net/blog/posts/…Lawley
@GauravMantri, well you can simply change one value in the cscfg file and execute csrun.exe (even though this will use the whole cscfg file)Lawley
WOW! That is amazingly helpful. Both my major Azure issues resolved. Your blog has gone to the top of my reading list!Cleopatracleopatre

© 2022 - 2024 — McMap. All rights reserved.