Switching from one connectionstring to another when moving from development to cloud

Posted by Nancy Walker on Stack Overflow See other posts from Stack Overflow or by Nancy Walker
Published on 2011-02-26T07:17:05Z Indexed on 2011/02/26 7:25 UTC
Read the original article Hit count: 234

Filed under:

Hello,

I am working on a cloud application. When I test out the application on my computer I want to have my connection string set as follows in ServiceConfiguration.cscfg:

<Setting name="DataConnectionString" value="UseDevelopmentStorage=true" />

When I publish to the cloud I need to have it set as follows:

<Setting name="DataConnectionString" value="DefaultEndpointsProtocol=https;AccountName=xxxx;AccountKey=yyy" />

I keep going from one environment to the other and keep having to change the DataConnectionString.

Is there a way that I can automate this? I looked around and can't see any examples but I'm sure some others have the same problem as me.

Thanks,

Nancy

© Stack Overflow or respective owner

Related posts about Azure