System.Configuration.ConfigurationManager.AppSettings

  • Thread starter Thread starter Peter Kirk
  • Start date Start date
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
 
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.
 
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
 
Back
Top