configurationmanager

M

Myo Zaw

hi,
can i use configurationmanager in .net 2.0 windows form. cause i have
an app.config file and i couldn't extract the data from there by using
configurationmanager nor 1.1 feature. do u have any suggestion about that.

thanks,
myo zaw
 
G

Guest

Try adding a referene to the System.Configuration assembly first (this
assembly is not one of the default references).
That should help with being able to use ConfigurationManager to read stuff
like AppSettings.
Peter
 
M

Myo Zaw

thanks,
it went fine. but, one more question, i don't know why i can't access
to app.config file in my windows service program. it worked fine in win32
application. i already tested with the same situation and sceniro but, in my
service, the call through configurationmanager (
configurationmanager.appsettings["myVal"].tostring() ) showed me null
reference exception. any idea about that?

thanks again,
myo zaw
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top