Reputation: 1090
I have been using Azure for some time for some different website I have been working on. Using visual Studio to do the publish and Azure holds the website and the sql. My question is this: How do I manage to publish to the development site and the production site? I have looked around on the web and have not found what I have been looking for so far. If I choose the publish profile for my production site, and publish via visual studio, how do I control that the website uses the correct production db? In the web.config of the site is currently the connectionstring for the development sql db. I dont want to sit and change the connection string every time I want to publish to the production site. There must be an easier way to do this? I imagine that when I sattisfied with the looks of the website on the development site, I will move it to the production site. But how is this handled? Hope you can help or send me in the right direction.
Upvotes: 1
Views: 96
Reputation: 12452
Using the Connection Strings in the Azure Portal, specify the production connection string in the production site configuration and the dev connection string in the dev site configuration.
these connection strings are injected into your .NET configuration connectionStrings settings at runtime, overriding existing entries where the key equals the linked database name.
https://azure.microsoft.com/en-us/documentation/articles/web-sites-configure/
Upvotes: 1