I have two windows application. eg ., FormA and FormB
The app.config of FormA is as below
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="company" value="DSRC"/>
</appSettings>
<connectionStrings>
<add name="test" connectionString="Testing Connection String"/>
</connectionStrings>
</configuration>
Now I have another application named as Form B.
I want to retrieve both appsettings and connectionstrings of Form A into Form B.
Further I should be able to modify both of these appsettings and connection strings and save it into the Form A.
I know how to retrieve the appsettings , and connection strings of the same application and modify.
But how do I obtain of some other application and modify the same.
Kindly do let me know.
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.config";
Configuration config =
ConfigurationManager.OpenMappedExeConfiguration(filename,
ConfigurationUserLevel.None);
But then just got struck, I just do not know how to proceed further (Sounds dumb right !)
Can anyone help me proceed down the way.
Regards cmrhema