System.Configuration.ConfigurationManager.AppSettings

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Peter Kirk

    System.Configuration.ConfigurationManager.AppSettings

    Hi there

    is there any way to tell what .config file the property
    System.Configur ation.Configura tionManager.App Settings 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

    #2
    Re: System.Configur ation.Configura tionManager.App Settings


    "Peter Kirk" <pk@alpha-solutions.dkskr ev i en meddelelse
    news:%23n3lW7LB HHA.4892@TK2MSF TNGP04.phx.gbl. ..
    Hi there
    >
    is there any way to tell what .config file the property
    System.Configur ation.Configura tionManager.App Settings 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.


    Comment

    • Michael Nemtsev

      #3
      Re: System.Configur ation.Configura tionManager.App Settings

      Hello Peter,

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

      Did u try the MSDN sample of using ConfigurationMa nager.AppSettin gs ?

      PK"Peter Kirk" <pk@alpha-solutions.dkskr ev i en meddelelse
      PKnews:%23n3lW7 LBHHA.4892@TK2M SFTNGP04.phx.gb l...
      PK>
      >Hi there
      >>
      >is there any way to tell what .config file the property
      >System.Configu ration.Configur ationManager.Ap pSettings 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.
      >>
      PKHi again
      PKwhile I didn't find out how to get the name of the current file
      PKAppSettings
      PKaccesses, 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 Nietzsche


      Comment

      Working...