Easily switching ConnectionStrings on publish to Azure
Posted
by David Pfeffer
on Stack Overflow
See other posts from Stack Overflow
or by David Pfeffer
Published on 2010-06-08T13:55:03Z
Indexed on
2010/06/08
22:32 UTC
Read the original article
Hit count: 330
I'm currently building an Azure Web Role. I am testing this project against a local database server on localhost
. Then, when confident that the project is working, I publish it to Staging on Windows Azure.
However, I also have to remember to change the connection string to point to the live SQL server on SQL Azure before deploying, and then change it back to localhost
afterwards.
Is there any nice way to automate this, or perhaps a different process to take to avoid the issue altogether? For example is there a way to have a configuration file for Azure that isn't updated with every deploy?
© Stack Overflow or respective owner