I have a windows application. e.g. FormA and FormB
The app.config file of form A is 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 called Form B.
I want to get both the binding settings and the connection strings of form A to form B.
Next, I should be able to change both of these settings and connection strings and save them in form A.
I know how to extract application settings and connection strings of the same application and change.
But how can I get some other application and change it.
Please let me know.
In fact, I have 4 service windows running under the same setup., One web service and one wcf service and one application. They all have different app.configs, consisting of different sets of settings and different connection strings. I have to create a windows application that will retrieve each of these parameters and then save it accordingly.
I tried to 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 it just hit, I just donβt know how to proceed further (Sounds silly!)
Can someone help me go the way.
Relationship cmrhema
source share