Questions tagged [custom-configuration]
75 questions
1
vote
2 answers
Can't Get Custom Configuration Section to Work
I am trying to create a custom configuration that looks like this.

DotNet n00b
- 85
- 2
- 12
1
vote
0 answers
How to fix "ModuleParseError: Module parse failed: Unexpected token (1:4)" about custom config Webpack angular typescript?
This is console log :
ModuleParseError: Module parse failed: Unexpected token (1:4)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders…

Arvel
- 11
- 2
1
vote
0 answers
Extend configuration with custom settings loaded from file
I am trying to extend the configuration for my application with value loaded from a custom configuration file. We are using node-config and this is what I am trying to do:
// Server entry
const config = require('config')
// Merge setting from our…

Cyclonecode
- 29,115
- 11
- 72
- 93
1
vote
1 answer
Copy properties of objects inside ConfigurationElementCollection to an array?
I created a custom configuration section and can add as many XML lines to my custom section and loop through and print them all. That works fine.
user4158347
1
vote
1 answer
How to get the Type of a class in Main Project through a class in Class Library Project
I have a class library project which is attached to a main project and in this class library project I have a class named SQSQueueScheduler.cs under this class I have written the below code
Contacts contact =…

Rajat
- 141
- 1
- 1
- 7
1
vote
1 answer
ConfigurationElement set null default value
I have a small problem with a custom configuration section in App.config.
The problem is: I have a CustomElement (let's call it 'a') whose properties CustomElement another (let's call it 'b').
I would like to have b as a value not null only if…

Luigi Russo
- 105
- 6
1
vote
0 answers
XML Custom Configuration Error Handling
Here is some code of my app.config file in my windows form application. I used this configuration file for the printer and scanner. I have used custom configurations in this xml. The problem I'm facing is whenever any attribute value is not set, My…

Shahbaz Shah
- 11
- 2
1
vote
1 answer
Loading Custom Configuration Section from DLL Reference
In our project we have defined a custom configuration section which works fine when being referenced in the project. Now we are trying to reference this same configuration section from a dll which is added as a reference. From the code in this dll…

Jeff Fol
- 1,400
- 3
- 18
- 35
1
vote
1 answer
C# .Net 4.0 - Custom Configuration File with Attributes and sections
I know that this topic has been covered in a number of different Stackoverflow articles, and I have read about 30 of them to make sure that what I am doing matches up with those. It is (even fro the .Net 2.0, 3.0, and 4.0 version of the answers)
I…

RWHertenstein2
- 103
- 12
1
vote
2 answers
Key-less elements in ConfigurationElementCollection
When you inherit ConfigurationElementCollection:
public class Directories : ConfigurationElementCollection
{
...
}
ConfigurationElementCollection requires an implementation for GetElementKey(System.Configuration.ConfigurationElement).
But I…

Alexandru
- 12,264
- 17
- 113
- 208
1
vote
2 answers
Polymorphic custom configuration section
Lets say I have the following configuration section....
Because the second element has the extra attribute on it I want to map it to a sub type of the…

Ian Warburton
- 15,170
- 23
- 107
- 189
1
vote
1 answer
Modify Custom Config Section Child Element Value
I'm in the process of attempting to remove some old legacy references and I'm now working on something I've never had to try doing before. Let's say I have a config file section like this:

Sven Grosen
- 5,616
- 3
- 30
- 52
1
vote
1 answer
Web.config - Custom configuration to hold a collection inside a collection
I am setting up a custom configuration in web.config using .
The structure of tags which I want and created in web.config is:
…

Deepak Pathak
- 626
- 1
- 9
- 19
1
vote
0 answers
Custom Configuration Validation Based off another Config value?
I am looking to make a Windows service that monitors certain directories using a .NET FileSystemWatcher. My plan is to have one FileSystemWatcher with the IncludeSubdirectores=True. However I do not want to monitor ALL of the sub-directories. So my…

user1018669
- 91
- 2
- 3
0
votes
1 answer
Create/Access Custom Configuration Section from location tag of web.config
I want to add some setting for various location and also want to access that per page basis
Or…

Mukesh Agarwal
- 392
- 4
- 13