Different connection string for each publish profile in VS2010
问题 Is it possible to change connection string (or just server host) relying on selected web publish profile? Maybe using Web.config transform or someway else? I mean for profile "Test" change connection string "MyConnString" (in published Web.config) to "Data Source='example.com,14333;..." and for profile "Production" - to "Data Source=./SQLExpress;..." 回答1: This is exactly what web config transforms were created for. The link you provided in your post has a walkthrough of doing this