Doppelmoep
Doppelmoep

Reputation: 436

Store ConnectionString on Azure using SimpleMembership

I'm using TFS Service for automatic deployment to Windows azure. The project is a Web Role and some class libraries. The deployment tasks works great - the only question is where to store the connectionstring? Normally I would store it in csdef / cscfg to use the correct value in development and in cloud environment but if I use SimpleMembership I tseems if this is not an option because I have to provide the Web.Config value during initialization.

Does anyone has a "best practice" for this problem?

Thank you!

Upvotes: 0

Views: 133

Answers (1)

Slav
Slav

Reputation: 596

You can create TFS task to transform web.config before deployment thus changing connection string values to point to your production DB see here for howto http://nirajrules.wordpress.com/2011/07/04/integrating-web-config-transformations-with-tfs-build/

Scott Hanselman also had a good post about web config transformations - http://www.hanselman.com/blog/WebDeploymentMadeAwesomeIfYoureUsingXCopyYoureDoingItWrong.aspx

Upvotes: 0

Related Questions