471,326 Members | 2,080 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,326 software developers and data experts.

ConfigurationManager question

ok, here's my question. I have a class ConfigServer that has the
following method:

public string FindByKey(string key)
{
try
{
return ConfigurationManager.AppSettings[key].ToString();
}
catch (Exception ex)
{
return ex.Message;
}
}

I also have a config file named MyAppName.dll.config (same as the output
dll).

I have this dll installed in the gac and located in a specific folder on
my machine with the config file.

I want this application to basically be used by various other
applications to read in settings. When I reference the dll from an a
different solution, I get and call this method, I get "Object reference
not set to an instance of an object".

Any thoughts?

Thanks!

*** Sent via Developersdex http://www.developersdex.com ***
Dec 5 '05 #1
2 968
Hi,

This might be a stupid question but are you sure 'your various other
applications' are referencing your dll properly.

It also might be an issue of cross communication between app domains.

Happy Coding,

Stefan
C# GURU
www.DotNETovation.com

"You always have to look beyond the horizon and can never be complacent
-- God forbid we become complacent."

Jozef Straus

*** Sent via Developersdex http://www.developersdex.com ***
Dec 6 '05 #2

Yes, I am referencing the dll properly. It is in only one spot on my
machine. Thanks.
*** Sent via Developersdex http://www.developersdex.com ***
Dec 6 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Michael Debus | last post: by
2 posts views Thread by Myo Zaw | last post: by
1 post views Thread by shapper | last post: by
3 posts views Thread by Mark | last post: by
4 posts views Thread by Jim in Arizona | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.