Represents a section within a configuration file.
Questions tagged [configurationsection]
122 questions
0
votes
0 answers
.Net parse ConfigurationSection throw a exception
I'm writing a custom config section,like this
…

赵乐赵乐
- 3
- 2
0
votes
2 answers
Loop through the configrationsection to read it's elements using C#
I have a configuration file, something like:
DEV
…

Sri Reddy
- 6,832
- 20
- 70
- 112
0
votes
1 answer
What is this element referred to in in app.config
I'm creating a ConfigurationSection. In the example given the attribute allowLocation of the attribute is set to true. Looking at what this allowLocation means, I am still puzzled. On that page is says Determines whether the section can be…

Mike de Klerk
- 11,906
- 8
- 54
- 76
0
votes
0 answers
C# - Calling method with parameter from ConfigurationElement property
When reading my config section, I want to call a method to convert the value specified to a ConsoleKey, if possible.
My config section is as follows:

devklick
- 2,000
- 3
- 30
- 47
0
votes
1 answer
C# Custom Config Section
I have a custom config section:

David Ward
- 3,739
- 10
- 44
- 66
0
votes
0 answers
Regex for semicolon separated numbers string in ConfigurationSectionDesigner validation?
Need to apply Regex validation for a string with semicolon separated HTTP status codes:
"202;500;503"
I tried this regex
^([0-9]+;)*[0-9]+$
but i get an exception:
The value for the property 'retryStatusCodes' is not valid. The error is: The value…

monstro
- 6,254
- 10
- 65
- 111
0
votes
1 answer
Unrecognized attribute 'name' when using in a ConfigurationElementCollection
I have a custom ConfigurationSection that contains a custom ConfigurationElementCollection with custom ConfigurationElement instances. The and tags work fine in the configuration file, but using generates the following…

Anthony T.
- 268
- 2
- 11
0
votes
1 answer
Unable to set nested json value via ConfigurationSettings
I have a class in Package XYZ say:
public class Temp
{
string a;
string b;
string c;
}
Another class in same package:
public class Other
{
public int id {get; set;}
public Temp temp {get;set;}
}
Now the values for Temp and…

learntogrow-growtolearn
- 1,190
- 5
- 13
- 37
0
votes
2 answers
How to rename sections in app.config? Section name does not work
isn't it possible to rename tags within the app.config?
If I use the following
...
...
…

Beachwalker
- 7,685
- 6
- 52
- 94
0
votes
1 answer
Add, Remove, Modify XML nodes without re-writting/overwritting entire XML file with Serializable objects
I am looking for workaround to write only "modified objects" to file without overwriting existing nodes/elements. I know how to Serialize object to XML using XmlSerializer class, but this involves re-writing entire XML.
Also, How is it possible with…

Ketan
- 79
- 1
- 9
0
votes
0 answers
ArgumentException thrown from ConfigurationConverterBase.ConvertFrom is escaping try/catch
I've created a custom ConfigurationSection that includes an IP address value. To properly get the value out of the configuration file a TypeConverter was created to parse the IP address. The configuration file used for this test is as…

Ryan
- 1
- 2
0
votes
1 answer
String-ConfigurationProperty within custom ConfigurationSection
I've got the following ConfigurationSection in one of my libs in my solution (let's say LibA.dll):
public class MyConfigurationSection : ConfigurationSection
{
[ConfigurationProperty("proxy", DefaultValue = "", IsRequired = false)]
public…

Florian
- 5,918
- 3
- 47
- 86
0
votes
1 answer
Creating a typed configuration class using MS Enterprise Library 5.0
I have a ASP.Net 4.0 web application for which I need to create typed configuration class. What I mean is as follows:
class SettingsClass
{
int count;
string name;
decimal amount;
}
Should map to the configuration file…

Moiz Tankiwala
- 6,070
- 7
- 38
- 51
0
votes
1 answer
Custom config elements collection in Web.config - Using a key to choose
Intro
I'm developing a WebApp built on C# ASP.NET.
I've been researching creating a "Custom Configuration" section with child elements in the Web.config file, and I've hit a bit of a snag when it comes to consuming the keys/values in the data.
I…

Geoff James
- 3,122
- 1
- 17
- 36
0
votes
2 answers
Could not load file or assembly while trying to create custom configuration section in a web config
I am trying to create my own custom configuration section with following:
Code in the web.config file: