Represents a section within a configuration file.
Questions tagged [configurationsection]
122 questions
1
vote
1 answer
Get ConfigurationElement parent in app.config
I have created a custom ConfigurationSection, ConfigurationElement(s) and ConfigurationElementCollection(s) for my app.config, it's based on this documentation.
Now I would like to be able to access a parent element in any configuration element.
For…

NixonUposseen
- 53
- 3
- 12
1
vote
1 answer
Creating customisable configuration using .NET
I'm trying to create some typed configuration similar to the following snippet...

Kieron
- 26,748
- 16
- 78
- 122
1
vote
1 answer
.NET - Referencing Custom Configuration Elements in App.Config
I have a .NET 4.7 application. In this application, I have several custom configuration elements that I want to use in the App.config file. For that reason, I've defined several configuration related classes in my project. This project compiles and…

Some User
- 5,257
- 13
- 51
- 93
1
vote
0 answers
Customized ConfigurationSection in Derived Project
I created a base library where my customized configuration section is located. This works fine so far - also in derived libraries:

mabunixda
- 105
- 7
1
vote
1 answer
Error reading Custom ConfigurationSection on an Azure WebJob
I have a console application that has an app.config file with multiple ConfigurationSections
An example configuration section would be :
public class ThrottlingConfigurationSection : ConfigurationSection, IThrottlingConfigurationSection
{
…

mmilan
- 1,738
- 8
- 31
- 57
1
vote
0 answers
custom config section seems to load the wrong file
Hi I'm creating a library (DLL) for which I want to load the .config file (DLL_name.config) and in which I have implemented a custom section. I'm using OpenEXEConfiguration and it loads the file, Configuration object has the right FilePath value…

Philippe Robert
- 11
- 1
1
vote
4 answers
How to: Use a ConfigurationSection without loading it via the GetSection call
I would like to load a specific ConfigurationSection but the way the CLR loads the assemblies is giving me some trouble:
My CustomConfigurationSection definition is on a specific assembly which cannot be found by the overall process of assembly…

ciriarte
- 1,433
- 2
- 13
- 23
1
vote
1 answer
C# ConfigurationSection Propeties are empty
Good evening people, im working on a little project and the ConfigurationSection i wrote is not returning the data i put in in the web.config.
enter code here
my code:
public class AdminSection : ConfigurationSection
{
private static…

Mickboe1
- 45
- 1
- 7
1
vote
1 answer
Configuring a list in a .net configuration section
I'm having troubles writing a configuration section for my application.
All I need is to config a list of pairs which I would translate to an object.
I have seen implementations using ConfigurationElement and ConfigurationElementCollection classes,…

user3688929
- 23
- 3
1
vote
0 answers
Does ConfigurationElementCollection preserve order
I need to store a list of objects to a configuration section in their prioritized order.
If I go with the standard implementation of extending ConfigurationElementCollection and ConfigurationElement (similar to what is described here). Will the…
1
vote
0 answers
Calling Save on a Configuration obj with a custom sectiongroup of type NameValueSectionHandler
I've got aConfiguration object that I can easily read and write settings from and call Save(ConfigurationSaveMode.Minimal, true) on and that typically works just fine.
However, I now have a config file that has a custom sectionGroup defined of…

Allen Rice
- 19,068
- 14
- 83
- 115
1
vote
2 answers
Create Virtual Directory and Set Permissions IIS7 - Cannot read configuration file due to insufficient permissions
I am trying to create a virtual directory and set it's permissions using IIS7 and C#. Here is a sample of my code:
using (ServerManager serverManager = new ServerManager(webSite))
{
ConfigurationSection anonymousAuthenticationSection =
…

Nick
- 19,198
- 51
- 185
- 312
1
vote
1 answer
Multiple Elements in Custom ConfigurationSection
UPDATE: Custom Configs are freaking HARD! >.< While I've learned some things about XML; evidently it's impossible to store CDATA in an element, so I've rephrased this question to fit the modified structure. Please ask me any questions for clarity.…

Chiramisu
- 4,687
- 7
- 47
- 77
1
vote
1 answer
Reading configuration in Java
I have recently started working in Java. I am trying to find a good way to specify my application's configuration values in an easy to read way. I'd like the ability to create a base configuration file and then include in a derived configuration…

akhil
- 839
- 3
- 8
- 15
1
vote
1 answer
How to have a collection of configuration sections in a .config file
I want to be able to use the following setup in my app/web.config files:
…

ChaseMedallion
- 20,860
- 17
- 88
- 152