How do I effectively store a connection string in machine.config only?
- by Scott Bedwell
We are moving to an environment with multiple engines of MS SQL running on the same server (a test engine and a production engine). We also have separate test and production web servers, and would like for our asp.net applications to "magically" use the test database engine on the test web server and the production database engine on the production web servers. We would like to store the connection strings in machine.config rather than in web.config, but when we put it in machine.config, visual studio's IDE (particularly with datasets) does not recognize that the machine.config contains the connection.
Does anyone know of a solution for displaying these machine.config connection strings in visual studio, or of a different solution that would accommodate for this?
Thanks.