I'd like to know what people have to say about managing an application within different environments. Imagine that you have four different machines, one is a Live webserver, Live dB server, Testing webserver and a Testing dB server. Now, you would like to create the same application in both webservers where they work with their respective dB server. My question regards how people manage this whether through 3rd party tools or methods/tricks.
From my research, I've found two ways of doing this and although both work, I figure there may be a better solution.
Has a nice article on achieving this goal. Basically this amounts to a dialog that allows you to chose a configuration file when deploying an application.
2. In my case, I created the application on the testing server and used the <appSettings> tag in the web.config file to define a key called 'connection' that houses the dB connection string. This way, in my app I use the following command to run a query:
myConnection = new System.Data.SqlClient.SqlC
Then I used the command, Project->Copy Project to copy this app to the Live server and made sure to change the key 'connection' to point to the Live dB
Although number 2. works great, it would be annoying in the case that there are more changes than just the connection string. In that case, I could see that the article I mentioned would be an improvement. Regardless, everytime you write a new application you'd have to work this scheme into it. Is there a better way? Does Configuration Manager provide a way to manage this? I've played around with it and all I see is the ability to turn 'Build' off in a particular configuration.
Any help/suggestion is welcome.