Questions tagged [configsection]

Specifies configuration section and namespace declarations.

47 questions
31
votes
1 answer

Custom app.config Config Section Handler

What is the correct way to pick up the list of "pages" via a class that inherits from System.Configuration.Section if I used a app.config like this?
BuddyJoe
  • 69,735
  • 114
  • 291
  • 466
18
votes
1 answer

log4net configuration exception

I am using log4net for logging. My logging configuration is stored in a separate file. Web.Config:ConfigSections
Specifying my config file in…
ram
  • 11,468
  • 16
  • 63
  • 89
16
votes
4 answers

C# ConfigurationManager.GetSection could not load file or assembly

I am stuck! this seems really daft but I can not see where I am going wrong. I am creating a 2.0 C# ASP.NET website. I am trying to use a custom section in the web.config file with: DatabaseFactorySectionHandler sectionHandler =…
Jon
  • 15,110
  • 28
  • 92
  • 132
12
votes
1 answer

Is there a difference between DictionarySectionHandler and NameValueSectionHandler?

In .NET, we can create custom configuration sections using the element, like so:
Luke Willis
  • 8,429
  • 4
  • 46
  • 79
12
votes
3 answers

Storing values in the web.config - appSettings or configSection - which is more efficient?

I'm writing a page that can use a couple of different themes, and I'm going to store some information about each theme in the web.config. Is it more efficient to create a new sectionGroup and store everything together, or just put everything in…
coder1
  • 3,447
  • 5
  • 30
  • 46
11
votes
2 answers

Could not find schema information for the element 'elmah'

I read all the answers already posted here but none seems to solve. Elmah is working flawlessly even if I got those warnings. Also I got those errors when I launch debug (f5) in visual studio 2012. On build everything is fine. Config section in…
Manight
  • 500
  • 5
  • 26
9
votes
3 answers

Get value from web.config applicationSettings into ASP.NET markup

I might be completely off track by now, so I will just ask this here so someone can help me. What I want to do, is to insert a value from my web.config, stored in an applicationSettings area, into my aspx markup. Specifically I want to reade a URL…
7
votes
1 answer

How can I retrieve list of custom configuration sections in the .config file using C#?

When I try to retrieve the list of sections in the .config file using Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); the config.Sections collection contains a bunch of system section but none of the…
Roussi Ivanov
  • 79
  • 1
  • 2
5
votes
1 answer

How to read custom config section in app.config in c#

I want to read following custom section from app.config:
Hemant Kothiyal
  • 4,092
  • 19
  • 61
  • 80
5
votes
1 answer

Providing intellisense/xsd validation to configsections

in a small c# project, I'm trying to create a simple custom configsection. I followed the instructions in CodeProject: Unraveling the Mysteries of .NET 2.0 Configuration and everything work nicely... apart from the fact that I don't get xsd…
Nicola Carrer
5
votes
1 answer

section type in app.config

I was going through how to create section groups and sections in configsection of app.config. So, lets take a sample
Silver
  • 443
  • 2
  • 12
  • 33
4
votes
2 answers

Get multiple instances of the same key within custom section

In my app.config file I have a custom section under configuration with multiple entries that share the same key.
4
votes
3 answers

What is the purpose of configSections?

I've done a little research and ran across this: http://msdn.microsoft.com/en-us/library/ms228245.aspx So if I'm understanding that correctly, ultimately what this is doing is including some .dlls for use within the project, much like:
Trajanus
  • 306
  • 1
  • 10
  • 21
3
votes
1 answer

Encrypting custom configuration settings

I'm having some troubles encrypting a configuration section. We use a package from an external supplier and the web.config is structured in the following way: web.config
basvo
  • 737
  • 1
  • 4
  • 12
3
votes
1 answer

Powershell - how to add to web.config

I'm trying to add a sectionGroup element to the configuration/configSections element in a web.config using Powershell. I currently have $filePath = [path to my web.config file] # load the XML from the web.config $xml = New-Object XML $xml =…
awj
  • 7,482
  • 10
  • 66
  • 120
1
2 3 4