473,385 Members | 1,397 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Configuration is read only

Rua
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
Nov 7 '06 #1
2 18299
Hello Rua,

See this one
http://msdn2.microsoft.com/en-us/lib...gssection.aspx

RHello
R>
RI need to include some name value properties in runtime. I tried
R>
RConfigurationManager.AppSettings.Add(strLSystem, 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
Rpersonalization
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
Nov 7 '06 #2
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.


"Rua" wrote:
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
Nov 8 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Famille Delorme | last post by:
Sorry if this discussion are already submited, but I don't find anything really interresting for me. And sorry for my bad english, it is not my native language. I wrote a program in Python for a...
1
by: Dan Noel | last post by:
I see many rich classes in System.Configuration, but all of these classes are read-only. While I have many rich classes for extracting information from a config while, I am reduced to the most...
1
by: Mevar | last post by:
Hello to everybody.I have a problem.I'm using an application configuration file to store particular settings.I use a custom Section Handler to read settings and everything work fine if I read my...
7
by: | last post by:
In the beginning we had Ini files. Later we had registery files. Now have xml files and our read-only myapp.config file. My question now, is what is the best way to store and load user and...
7
by: MrNobody | last post by:
I was a Java developer so I'm used to using property files as a means to keep configuration settings for my apps. I'm wondering what options are there with ..NET? Some settings I want to include...
5
by: rdcpro | last post by:
In reading MSDN docs on creating custom Configuration sections, I found this page: ...
5
by: Tim Marsden | last post by:
Hi How do I manually read then values held in an app.config file. I have an application with an application configuration file. I can read the values in the file using...
3
by: =?Utf-8?B?SmVycnkgQw==?= | last post by:
I am trying to implement a configuration section in web.config and was wondering if I could do it without writing a handeler. I tried in the <configSections>. <sectionGroup name="Domains" >...
4
by: David Williams | last post by:
I am familiar with creating custom configuration settings and accessing them. However, for a current requirement, I need to control the various settings in my custom configuration section by...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.