I have a website which communicates with an SQL database. In the websites web.config file, I create a "ConnectionString" to tell the program where the database is located. The website is made in Visual Studio 2010 and it is running Framework 4.
At the moment I run the website and database on a test server from a test domain. I have now moved the website to another server and database, and run the website from another domain.
Is it possible to create two web.config files, so that when I open the website on my test domain, it will connect to the database on the test server, and when I connect to the website on the "active" domain, it will connect to the database on the "active" server?
Both servers and domains are up and running, all I need is a way to connect to the right database depending on which domain I open the site from.
If any more information is needed, don't hesitate to ask.