Configuration is read only

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

    Configuration is read only

    Hello

    I need to include some name value properties in runtime. I tried

    ConfigurationMa nager.AppSettin gs.Add(strLSyst em, strClient);

    but it tells me that configuration is read only. Can anyone tell me how to
    do this? It does not have to be written in the app file, but I need to write
    permanent configuration information, basically for personalization

    TIA
  • Michael Nemtsev

    #2
    Re: Configuration is read only

    Hello Rua,

    See this one
    Provides configuration system support for the appSettings configuration section. This class cannot be inherited.


    RHello
    R>
    RI need to include some name value properties in runtime. I tried
    R>
    RConfigurationM anager.AppSetti ngs.Add(strLSys tem, strClient);
    R>
    Rbut it tells me that configuration is read only. Can anyone tell me
    Rhow to do this? It does not have to be written in the app file, but I
    Rneed to write permanent configuration information, basically for
    Rpersonalizatio n
    R>
    RTIA
    R>
    ---
    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

    • Shailen Sukul

      #3
      RE: Configuration is read only

      Step 1. Add a reference to System.Configur ation
      Step 2. Add a using System.Configur ation at the top of your class

      ConfigurationMa nager.AppSettin gs.Add(strLSyst em, strClient); should work now.




      "Rua" wrote:
      Hello
      >
      I need to include some name value properties in runtime. I tried
      >
      ConfigurationMa nager.AppSettin gs.Add(strLSyst em, strClient);
      >
      but it tells me that configuration is read only. Can anyone tell me how to
      do this? It does not have to be written in the app file, but I need to write
      permanent configuration information, basically for personalization
      >
      TIA

      Comment

      Working...