DelphiFAQ Home Search:

Error message 'the key ... does not exist in the appSettings configuration section'


comments81 comments. Current rating: 3 stars (80 votes). Leave comments and/ or rate it.


I try to compile Visual C++ application that a friend mailed me. The code compiles fine, I can start the application, but when I open a form (dialog), the following exception is thrown:

"the key novelDesign.checked does not exist in the appSettings configuration section"

novelDesign is a radio button in that form. What's going on?


Apparantly your friend decided to have default values for the dialog's controls stored in an external .config file. His computer has the config file (typically named application.exe.config or application.config). You could run the application in the debugger and see where it breaks.

It is probably in the InitializeComponent() method, looking as shown in the code below.
Remove the line with the GetValue() reference and it will run fine.

My personal opinion is that default values for dialog controls do not belong in an external .config file anyway.

void InitializeComponent(void) {
	System::Configuration::AppSettingsReader *  configurationAppSettings =
		 new System::Configuration::AppSettingsReader();

	// ..
	// comment out the next line
	this->novelDesign1->Checked = (*__try_cast<__box System::Boolean * >

	// the remaing code is ok
	this->novelDesign1->Location = System::Drawing::Point(16, 48);
	// ..


You are on page 1 of 6, other pages: [1] 2 3 4 5 6
2006-01-27, 14:17:28 from Canada  
I have a problem with app.config file to.
I put a connection string inside and I tried to retrieve the information in my application in form constructor after InitializeComponent().
If I am using:
string ConnString =

ConnString is null after execurion.
If I’am using:
system.Configuration.AppSettingsReader configurationAppSettings = new System.Configuration.AppSettingsReader();
                ConnString=((string)(configurationAppSettings.GetValue('ConnStringSVH', typeof(string))));
I got the exception: {'The key 'ConnString' does not exist in the appSettings configuration section.' }
I realize that if I put in Debug directory the config file will be deleted when I run in debug the application.
Any thought?
P.S.1. I rename the config file and put the name of myapp.config
2. I have several project in the same solution Is just in the last one that it didn’t work.
2020-06-23, 11:34:02
Roseann from United Kingdom  
This blog was... how do I say it? Relevant!!
Finally I've found something that helped me.
2020-06-23, 17:49:46
Lizzie from United States  
I enjoy reading an article that will make people think.
Also, many thanks for permitting me to comment!
2020-06-23, 21:46:35
Tabitha from United Kingdom  
I all the time emailed this webpage post page
to all my friends, for the reason that if like to read it afterward my contacts will too.
2020-06-24, 11:45:30
Mary from Germany  
naltrexone 50 mg tablet cost
2020-06-24, 16:08:28
Now I am ready to do my breakfast, when having my breakfast coming over again to read other
2020-06-24, 20:00:04
buy clomid online without prescription
2020-06-25, 04:49:42
naltrexone hcl tablet 50 mg
2020-06-25, 12:34:46
Rosalind from Uzbekistan  
Hello mates, its great article on the topic of cultureand fully explained, keep it up all the time.
2020-06-25, 13:41:48
over counter antibiotics at cvs
2020-06-25, 15:36:19
Hey would you mind stating which blog platform you're working with?
I'm planning to start my own blog in the near future but I'm having a tough time
making a decision between BlogEngine/Wordpress/B2evolution and Drupal.
The reason I ask is because your design and style seems different
then most blogs and I'm looking for something unique.
P.S Sorry for being off-topic but I had to ask!
2020-06-25, 21:02:17
Tahlia from Greece  
Wow, amazing web log complex body part! How yearn stimulate you ever been blogging for?
you pretend blogging see leisurely. The overall glimpse of your internet site is great,
countenance unaccompanied the subject matter textile!
You are on page 1 of 6, other pages: [1] 2 3 4 5 6



NEW: Optional: Register   Login
Email address (not necessary):

Rate as
Hide my email when showing my comment.
Please notify me once a day about new comments on this topic.
Please provide a valid email address if you select this option, or post under a registered account.

Show city and country
Show country only
Hide my location
You can mark text as 'quoted' by putting [quote] .. [/quote] around it.
Please type in the code:

Please do not post inappropriate pictures. Inappropriate pictures include pictures of minors and nudity.
The owner of this web site reserves the right to delete such material.

photo Add a picture: