Questions tagged [configurationsection]

Represents a section within a configuration file.

122 questions
3
votes
2 answers

Create or edit custom configuration section at runtime

I have a custom configuration section, something like: I'm trying to figure out how I can add/edit this section in the…
3
votes
2 answers

Need to configure SMTP settings on IIS for the ASP.Net Core Identity server for the EMail verification

I successfully deployed the Identity server and it is working fine also configure the SMTP settings on the VPS but when try to set up it with the ASP.Net Core 3.1 Application unable to find the SMTP in the features using IIS. I used No Managed Code…
Kashif Saeed
  • 127
  • 2
  • 12
3
votes
2 answers

Why does ConfigurationSection need to look things up with a string?

The ConfigurationSection examples I have found online (for example) all have code that looks like this: public class ConnectionSection : ConfigurationSection { [ConfigurationProperty("Servers")] public ServerAppearanceCollection…
Marius
  • 57,995
  • 32
  • 132
  • 151
3
votes
1 answer

System.Configuration.ConfigurationSection not available under a class library

I'm migrating a piece of functionality from my App_Code directory to a separate project that's going to build a class library to be referenced by my web app. One of my classes in the App_Code piece inherits form…
fr0man
  • 865
  • 3
  • 12
  • 27
3
votes
1 answer

How can I solve "Unrecognized element 'elementName'. (line x) (line x)"?

I have the following code var section = new CustomConfigurationSection(); section.SectionInformation.Type = "System.Configuration.NameValueFileSectionHandler"; section.SectionInformation.SetRawXml(sectionXml); configuration.Sections.Add(sectionName,…
Serhat Ozgel
  • 23,496
  • 29
  • 102
  • 138
3
votes
1 answer

How to create tag in web.config file?

Is it possible to add location tag dynamically with c# in web config? for example, I want to add:
Inbal
  • 909
  • 2
  • 28
  • 46
2
votes
1 answer

Getting section filtering to xml attribute

I want to select SMS section block according to tip attribute of SMS xml. Currently: ConfigurationManager.GetSection("Logger/Sms") works but is there any way to get section like ConfigurationManager.GetSection("Logger/Sms[@tip='VF']")?
uzay95
  • 16,052
  • 31
  • 116
  • 182
2
votes
3 answers

aspnet_regiis -pe cannot find my configuration section in .net v4.0.30319

I've added a new Settings.settings file to my ASP.NET Webclient project; I am having a problem encrypting the section. In the cmd window positioned to this directory: C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319> Here is my syntax: aspnet_regiis…
2
votes
2 answers

Custom Configuration Collection - Unrecognized element 'addService'

Example from MSDN on making a custom config section that should work as follows, class RemoteServiceSection : ConfigurationSection { [ConfigurationProperty("remoteServices", IsDefaultCollection=false)] …
Sean
  • 203
  • 4
  • 14
2
votes
1 answer

Default Accessor Needed: Custom ConfigurationSection

I am totally confused by a simple Microsoft error message. When I run XSD.exe against an assembly that contains a custom ConfigurationSection (which in turn utilizes a custom ConfigurationElement and a custom ConfigurationElementCollection, as well…
user553671
2
votes
2 answers

How can I use values of custom type in ConfigurationSection?

Let's say I have type Point2D (this is example), how can I use this type with ConfigurationSection -- in other words, what methods I have to implement in order value of my type be created from string. One way would be to provide TypeConverter, is…
astrowalker
  • 3,123
  • 3
  • 21
  • 40
2
votes
0 answers

activeMq-5.13.3 setup configurations for wildfly 10.0.0

Hi I am new to work on activemq, i am trying to access the messages send from the activemq in mdb onMsg() method but i am unable to get the things done here the sample standalone-full.xml configuration.
Naresh
  • 21
  • 2
2
votes
0 answers

ConfigurationSectionGroup.Sections properties always empty

It's a simple windows forms application, one screen and nothing more. I've created my own ConfigurationSection handler Assembly RemoteFactoryManager.Utils.dll public class EnvironmentSection : ConfigurationSection { public EnvironmentSection() {…
2
votes
1 answer

Is it possible to create a ConfigurationElement from xml text?

We have a custom class that inherits from ConfigurationElement called SignalConfigurationElement and defines a bunch of properties using the ConfigurationProperty attribute. The SignalConfigurationElement class is part of a much larger hierarchy of…
Brandon
  • 4,491
  • 6
  • 38
  • 59
2
votes
1 answer

Read settings / sections from the web.config or app.config file

I have many Connection strings in my web.config file. I also have a "dataConfiguration" setting in the same file which specifies what database my app connects to. How do I read the "defaultDatabase" setting / section from the Please see below xml…
dm7777
  • 21
  • 2
1 2
3
8 9