In azure web apps, there's a tab called "Deployment option" that allows a push from a github branch to azure web apps. Currently I'm developing a website in Umbraco and is trying to get this option to work properly. I have been able to successfully connect connect web app and sync the build from that branch from github. However, after the deploy, the connection is wrong so I have deduced that it's potentially a connection string problem. Therefore, is there a way to perform web.config transforms while using this deployment option?
1 Answer
Generally, you should not attempt to transform your web.config with connection strings during deployment, as doing this leaves you with physical files containing secrets (dangerous practice).
Instead, you need to set your connection strings using the Azure Portal (or ARM API). Just keep a 'dummy' entry in your web.config to mark that you have this key, and then override the value with the real connection string in the portal.
See doc for related info.
6 Comments
Eric Shay
Oddly enough, when I set it using the Azure Portal, it still dosn't point to the right connection string. I'm still connected to our Test database instead of our production database. It dosn't seem to want to override the connection string found in the web.config
David Ebbo
That is not expected. But hard to tell more without having full details on the scenario
Eric Shay
I changed the database via the portal connection string, then checked the actual web.config file itself using the file browser, it still is stuck on the old connection string that we use for testing. Actually now that I think about it, the images wont load and the back end wont load, is that still a connection string problem?
David Ebbo
If your images are broken, you very likely have issues that are not related to Connection Strings.
Eric Shay
What about the back end, umbraco uses a SQL database connection in order to authenticate, and no matter which user/password combination that I enter is right, I can't log in.
|