Actually I have 4 windows services running under one setup., one webservice and one wcf service and one application.
All these have different app.configs, comprising of different appsettings and different connection strings.
I am supposed to create a windows application that will retrieve each of these settings and then save it accordingly.
I tried upto this level
-
ExeConfigurationFileMap filename= new ExeConfigurationFileMap();
-
fileMap.ExeConfigFilename = @"D:\Home\FormA\FormA\bin\Debug\FormA.exe";
-
-
-
Configuration config =
-
ConfigurationManager.OpenMappedExeConfiguration(filename,
-
ConfigurationUserLevel.None);
But then just got struck, I just do not know how to proceed futher (Sounds dumb right !).
I am able to retrieve all the keys related to appsettings but not the connectionstrings.
And to the reply to your question as why should we be retrieving appsettings is,
We are going to send this to our client, who will decide the database, In other words database will be changed, further we have set a time for the sockets to recieve data, the polling time, the interval everything under the appsettings and connectionstrings.
The client wants to modify these, hence the need for controlling appsettings for the whole package arises.
Please do not suggest to add ConfigurationSettings into the appsettings, as my request has been turned down by my TL