Hi
I have multiple projects in a solution each one has its own app.config file now i want to make a common place to change the connection string of the final output
How do i do this??
Please help
Thanks
Guruparan
Common app.config for solution
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Datta KharadRank #2,135 · 668 reputationPosted Jan 16, 2012, 7:37 PM EST
In common app.config file:-
name="appSettings"
type="System.Configuration.AppSettingsSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
/>
To access mapped config file
ConfigurationFileMap fileMap = new ConfigurationFileMap(file); //Path to your config file
Configuration configuration = ConfigurationManager.OpenMappedMachineConfiguration(fileMap);
string value = configuration.AppSettings.Settings["key1"].Value;
Jignesh TrivediRank #16 · 50.3K reputationPosted Jan 16, 2012, 10:26 PM EST
the better idea is to create common poject that handle only database activity.
and this share between all project.
this help to mantain connection string ,code and many other things.
hope this help.