System.Configuration.ConfigurationManager.AppSettings

P

Peter Kirk

Hi there

is there any way to tell what .config file the property
System.Configuration.ConfigurationManager.AppSettings is trying to access?

I have a class which uses this property but no appSettings are being loaded,
so I am guessing it is trying to access a different config file than I think
it is.

Thanks,
Peter
 
P

Peter Kirk

Peter Kirk said:
Hi there

is there any way to tell what .config file the property
System.Configuration.ConfigurationManager.AppSettings is trying to access?

I have a class which uses this property but no appSettings are being
loaded, so I am guessing it is trying to access a different config file
than I think it is.

Hi again
while I didn't find out how to get the name of the current file AppSettings
accesses, I did find out what I was doing wrong. A case of RTFM.
 
M

Michael Nemtsev

Hello Peter,

It use that config which belongs to your host process (generaly your exe)

Did u try the MSDN sample of using ConfigurationManager.AppSettings ?

PK> "Peter Kirk" <[email protected]> skrev i en meddelelse
PK> PK>PK> Hi again
PK> while I didn't find out how to get the name of the current file
PK> AppSettings
PK> accesses, I did find out what I was doing wrong. A case of RTFM.
---
WBR,
Michael Nemtsev :: blog: http://spaces.live.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsch
 

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