Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4559380
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T17:46:50+00:00 2026-05-21T17:46:50+00:00

Long story short, the .Net ConfigurationManager.GetSection method skips duplicates, and I’m looking for a

  • 0

Long story short, the .Net ConfigurationManager.GetSection method skips duplicates, and I’m looking for a best practice for handling this. I have a config file that includes something like this:

   <views>
     <view name="BusinessUnitsView" Desc="desc1"/>
     <view name="BusinessUnitsView" Desc="desc2"/>
   </views>

I have a graph of objects the config loads onto where collections derive from our derived version of ConfigurationElementCollection. The views collection in the graph only has one item in it after loading the above–my understanding is that this is simply the way the ConfigurationManager handled duplicates. The last item with the same key wins.

I could throw an exception on a duplicate being found by using BaseAdd(element, true). However, if possible I’d like to get the object completely loaded WITH duplicates, as the config gets read in a service layer, and I’d like to detect and deal with the problem on the consuming side of the service.

Do I have any options for modifying the way adds to the collection work?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T17:46:51+00:00Added an answer on May 21, 2026 at 5:46 pm

    You will need to create your own ConfigurationSection. See here or here (the second link’s method has been deprecated, but it may still shed some light)

    This allows you to represent internal configuration variables as collections, and set properties like DefaultValue and IsRequired.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Long story short, I am looking for the best way to quickly and efficently
Long story short, I have an ASP.NET application I'm trying to debug and at
Long story short, I'm working on a .NET profiler that at one point gets
Long story short Say I have the following code: // a class like this
Long story short, I have a substantial Python application that, among other things, does
To make a long story short I have to use processing in a class
Long story short, I am trying to build a very bare bones UDP SKB
Long story short: We've got a system that we're moving from one server to
Long story short, the database I'm using needs to get looked at. Until that
Summary Long story short, we've been tasked with gutting the authentication and authorization parts

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.