I have an ASP.Net project that uses an external config file for application settings. The web.config file has the following node to do this:
In the above scenario all of the key/value settings for the website are in that appSettings.config file, using the following syntax:
<add key="MyKey" value="MyValue"/>
The reason the site is set up this way is so that when we move it from various environments (Dev/Test/Prod) we are not required to change the web.config file each time that happens. The config files are in the same directory on each hosting server.
Now we've added a reference to a WCF which appears in web.config. In this scenario we have different WCF environments as well (Dev/Test/Prod). Is there a way to have the WCF reference target an external configuration file as well? This is what the reference looks like which was generated by Visual Studio 2008 when I added the reference.
What I want to do is store those 2 entries for MyWCFReference in an external file. Since it isn't in the <appSettings> node, where can I put the reference? Would it work to add a "file=" attribute to the <client> node above, like so?
Then put this into the wcfSettings.config file?
I was unable to find anything here or on the web that addressed this. Thanks.