471,624 Members | 1,936 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

configurationmanager

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
Nov 30 '05 #1
2 2804
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

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Myo Zaw" wrote:
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

Nov 30 '05 #2
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
Dec 1 '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 robertino | 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
1 post views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | 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.