|
-
Jul 27th, 2007, 06:23 AM
#1
Thread Starter
PowerPoster
unable to retrieve key App.Config
I have a class library in .NET 1.1 which uses its own app.config.
There is another application I am trying to use my assembly with, and that has its own config file entitled (applicationName.config). Mine is just "app.config".
Now, it is unable to retrieve the key from my app.config, it returns null. Any ideas whats causing the problem?
The code:
string keyValue = System.Configuration.ConfigurationSettings.AppSettings[key];
The key does exists
-
Jul 27th, 2007, 11:05 AM
#2
Re: unable to retrieve key App.Config
Is there somewhere in the DLL where the particular .config file has been specified? How does it know, of itself, to look in applicationname.config?
-
Jul 27th, 2007, 12:00 PM
#3
Thread Starter
PowerPoster
Re: unable to retrieve key App.Config
true, after some further researching found out that its not entirely possible, there is a workaround but not good enough for my purpose so had to create my own xml format unfortunately.
workaround was to reset the AppDomain and the config file settings to point to the new specified config file of your choice.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|