Configuration is read only

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello

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

ConfigurationManager.AppSettings.Add(strLSystem, 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
 
Hello Rua,

See this one
http://msdn2.microsoft.com/en-us/library/system.configuration.appsettingssection.aspx

R> Hello
R>
R> I need to include some name value properties in runtime. I tried
R>
R> ConfigurationManager.AppSettings.Add(strLSystem, strClient);
R>
R> but it tells me that configuration is read only. Can anyone tell me
R> how to do this? It does not have to be written in the app file, but I
R> need to write permanent configuration information, basically for
R> personalization
R>
R> TIA
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
 
Step 1. Add a reference to System.Configuration
Step 2. Add a using System.Configuration at the top of your class

ConfigurationManager.AppSettings.Add(strLSystem, strClient); should work now.
 

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

Back
Top