Specifies configuration section and namespace declarations.
Questions tagged [configsection]
47 questions
0
votes
1 answer
.NET Console Application configSections
I have a shared class library which is being used by an asp.net web application and a console application.
In the web.config of my web app, I have a sectionGroup within the configSections declared, and then the matching settings.
…

Tim B James
- 20,084
- 4
- 73
- 103
0
votes
0 answers
.Net custom config section not loading
I am trying to create a custom config section for storing api settings by region. This is for a asp.net web api.
However I am unable to get my custom config section to work. When I run the unit test it says:
Message:…

webdevbing
- 322
- 1
- 3
- 12
0
votes
0 answers
Cant generate MyAssembly.XmlSerializer
In our Company Project, we have a method in a class with the following line
XmlSerializer serializer = new XmlSerializer(typeof(Settings));
This causes an exception saying that MyAssembly.XmlSerializer cant be found.
From what I gather is that…

Moonpaw
- 55
- 8
0
votes
1 answer
configSection supposed to be at the first element in app.config
Why is configSection supposed to be at the first element in app.config ?
I had a 'System.TypeInitializationException' in my WPF application,
Message: An unhandled exception of type 'System.TypeInitializationException' occurred in…

Mavil
- 282
- 1
- 2
- 9
0
votes
1 answer
Reading from configSection attribute of type "Type"
I've a section like this
in my code I need to create an Instance of MyClass, so what I do is something like that:
string type = GetMySectionType(); // "Namespace.MyClass, AssemblyName"
var…

gsharp
- 27,557
- 22
- 88
- 134
0
votes
1 answer
How to create a nested configuration section in app.config file? Error: "Unrecognized attribute"
I have a requirement to create a nested configuration section. The issue is that I need to write an application that accesses any number of databases. These could be oracle, sql, or anything else... I want to make my config section look like…

Hooplator15
- 1,540
- 7
- 31
- 58
0
votes
1 answer
Custom ConfigSection either to load it from app.config or from external file
We have specific need for Custom configuration in app.config which I have successfully implemented but in case if that section is exponentially increasing which may occur as more and more functionality adding to our application, I want to separate…

VyshuRam
- 93
- 1
- 10
0
votes
0 answers
Configuring instances in Unity Container configured in App.Config at runtime
I have a speciifc configuration problem.

VyshuRam
- 93
- 1
- 10
0
votes
0 answers
0
votes
1 answer
Custom config section error on file download in MVC
I'm using a custom configuration section in my web.config in an ASP.NET MVC 5 project. It works perfectly fine, until I try to download a file via a link:
...
Here's how I'm handling the…

Didaxis
- 8,486
- 7
- 52
- 89
0
votes
1 answer
Custom config section handler can't find handler
I'm creating configSections in app.config with my custom handler AbraMain.MyConfigHandler
Error:
Could not load type 'AbraMain.MyConfigHandler.ApplicationListCollection' from assembly 'System.Configuration, Version=4.0.0.0, Culture=neutral,…

Terry Wu
- 3
- 2
0
votes
1 answer
Split appSettings into multiple sections / files?
Can I split appSettings into multiple external config files and include them in main web.config?
Here is what I have tried, but its not working :(
In web.config I defined a new section:

monstro
- 6,254
- 10
- 65
- 111
0
votes
1 answer
After application closes App.config returns to its default state
Here is the config:

EngineerSpock
- 2,575
- 4
- 35
- 57
0
votes
1 answer
Accessing data from web.config (in views folder)
I'm working on an MVC application and in a particular section of the website I need to send notification emails (I'm guessing maybe a maximum of 10). So I thought that I'd save the emails as a list in the web.config file and then loop through the…

Daniel Grima
- 2,765
- 7
- 34
- 58
0
votes
2 answers
Store same key in Machine.config and App.config
I'm holding a custom configuration section in machine.config of following structure:
Now, i want to be able to override the same key settings…

Uri Abramson
- 6,005
- 6
- 40
- 62