I need to use different database connection string and SMTP server address in my ASP.NET application depending on it is run in development or production environment.
<
The
tag in web.config supports a file attribute that will load an external config with it's own set of key/values. These will override any settings you have in your web.config or add to them.
We take advantage of this by modifying our web.config at install time with a file attribute that matches the environment the site is being installed to. We do this with a switch on our installer.
eg;
Note: