I am guessing it is creating a second .csfg file, but the config thing is hardwired into the Azure project type so I’m not really sure.
For example, if I wish staging and live to point at different sql-azure databases, how do I go about it?
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Assuming you want to the ability to make changes on the fly, almost like modifying a web.config and cycling an app pool in IIS, using multiple Service Configuration (.cscfg) files is the best approach.
Azure allows you (using both the Portal, and the Service Runtime API) to change the service configuration on-the-fly. You can design your application to respond to this, and have full control of the behavior based on the changes you apply.
To implement this you’d need to do two things:
(1) Migrate the settings you want the ability to change at runtime from a traditional app or web.config, to the .cscfg. (Declared in the Service Definition (.csdef))
(2) Hook the event handler(s) for environment changes
From there you can decide if you want to simply re-instantiate certain objects using the new variables, or take more drastic action such as recycling the role.