Represents a section within a configuration file.
Questions tagged [configurationsection]
122 questions
7
votes
1 answer
Forcing ConfigurationManager to reload all sections
I am writing a configuration system in which the app.config file is dynamically constructed from various config fragments distributed across multiple locations. The system currently works as follows:
Bootstrapper builds configuration…

Szymon Rozga
- 17,971
- 7
- 53
- 66
6
votes
2 answers
Does .net custom config section elements have to have keys?
Concider the following config section:

Jan Petter Jetmundsen
- 546
- 6
- 16
5
votes
4 answers
How can I use TypeConverters with a ConfigurationSection?
So I've got a ConfigurationSection/ConfigurationElementCollection that has a configuration like this:
And here is how I handle the mimeFormats:
public class MimeFormatElement:…

David Murdoch
- 87,823
- 39
- 148
- 191
5
votes
1 answer
Intellisense for custom config section problem with namespaces
I have just rolled a custom configuration section, created an accompanying schema document for Intellisense and added it to the Web.config's Schemas property as per Michael Stum's answer to another similar question.
Unfortunately, and possibly due…

Quick Joe Smith
- 8,074
- 3
- 29
- 33
5
votes
0 answers
Cannot save ConfigurationSection in Startup.cs - Web API
I cannot save my custom ConfigurationSection in my web.config file on startup.
I've followed this tutorial for a generic implementation. My unit tests passed, I'm able to save de ConfigurationSection in my unit tests!
On application start, I…

erwineberhard
- 309
- 4
- 17
5
votes
2 answers
Sections must only appear once per config file! why?
I'm getting the following exeption:
"Sections must only appear once per config file. See the help topic for exceptions. "
my configuration file look like this:

Or A
- 1,789
- 5
- 29
- 55
5
votes
2 answers
How to loop through configurationSection
I have the following section in my Web.config file:
…

bombo
- 1,781
- 6
- 22
- 25
4
votes
3 answers
Read web.config section to List
I have this in a web.config :
I'd like read the all section "MySection" and get all value to a List (ex…

TheBoubou
- 19,487
- 54
- 148
- 236
4
votes
1 answer
What is the implicit contract for a property's type when used with the ConfigurationProperty attribute?
As an example, I would like to serialize and deserialize a System.Version object as part of my application's custom configuration section. I am attempting to do so with the following property declaration:
public class ConfigElement :…

Steve Guidi
- 19,700
- 9
- 74
- 90
4
votes
2 answers
Help with using ConfigurationSection to properly read from a config file
I'm trying to create classes to read from my config file using ConfigurationSection and ConfigurationElementCollection but am having a hard time.
As an example of the config:

Little Larry Sellers
- 270
- 2
- 5
- 11
4
votes
1 answer
Change .NET configuration at runtime without modifying app.config
I need to change a .NET app's configuration at runtime (to be precise, at startup).
The app doesn't have write access to the place where the app.config (or web.config) is saved.
The configuration section I need to add is third-party (by Oracle), so…

Bass
- 378
- 5
- 15
4
votes
2 answers
Using FileSystemMonitoring for reading changes in app.config and writing to app.config realtime
I am using FileSystemWatcher to monitor any changes in the app.config file. And also, writing to the config file.
Here is my code :
MyApplication is the main project and DataCache is a clas library referenced in MyApplication.
using System;
using…

Monica
- 169
- 2
- 13
4
votes
3 answers
ConfigurationSection multiple enum values
Is there a way to set multiple enum values in a configuration section?
Like you do in .net object.Filter = Filter.Update | Filter.Create;
Is something like that supported?

mimo
- 937
- 12
- 19
3
votes
2 answers
Error reading Custom Configuration Section: No parameterless constructor defined for this object
Having a horrible time reading a custom configuration section from web.config:
I am using Configuration Section Designer (http://csd.codeplex.com/).
UPDATE:
here is the error I am getting:
System.Configuration.ConfigurationErrorsException: An error…

xdhmoore
- 8,935
- 11
- 47
- 90
3
votes
4 answers
Adding custom attributes to Custom Provider Configuration Section in app.config
I am following this great article on how to create a Provider framework in .NET
Basically, this article explains greatly how to end up with a configuration file like the following:

agarcian
- 3,909
- 3
- 33
- 55