Login or Sign up Help | Site Map
Connecting Tech Pros Worldwide

Configuration file for each dll

Question posted by: StefaniaO (Newbie) on July 25th, 2008 09:04 AM
Hi all, I have a question about configuration file of an application.
I have an exe file plus a number of dll (classl ibrary) that I dinamically load. I have a unique config file that I modify when I have to add a new dll.
Instead I want to handle a file for each dll.
I tried with linkedConfiguration but it did work.
Th piece of code I use to access section information in the general app.config is:

IDictionary sourceConfig = (IDictionary)
ConfigurationManager.GetSection("CUCM6AD/CUCM6AppUserDevPoolMapping");

I tried also with:
ExeConfigurationFileMap fileMap = new ExeConfigurationFileMap();
fileMap.ExeConfigFilename = System.IO.Directory.GetCurrentDirectory() + @"\FARSync_CUCM6ADBL.dll.config";
System.Configuration.Configuration config =
ConfigurationManager.OpenMappedExeConfiguration(fi leMap,
ConfigurationUserLevel.None);
ConfigurationSection section = config.GetSection("CUCM6AD/CUCM6AppUserDevPoolMapping");

but I can't cast the ConfigurationSection to IDictionary...
Any ideas ??
Thank you very much
Would you like to answer this question?
Sign up for a free account, or Login (if you're already a member).
Reply
Not the answer you were looking for? Post your question . . .
182,081 Experts ready to help you find a solution.
Sign up for a free account, or Login (if you're already a member).

Top .NET Forum Contributors