I follow this docs/clear-element-for-configsections.md at master · dotnet/docs
this is my app.config file
<configSections>
<clear/>
<remove name="oracle.manageddataaccess.client" />
<section name="oracle.manageddataaccess.client" type="OracleInternal.Common.ODPMSectionHandler, Oracle.ManagedDataAccess" />
but I still get error
System.Configuration.ConfigurationErrorsException: Section or group name 'oracle.manageddataaccess.client" is already defined. Updates to this may only occur at the configuration level where it is defined.
I have found this ASP.NET MVC Web.Config
clear and remove were never implemented for configSections and sectionGroups because of the difficulty involved attempting to merge different definitions of the same section-handlers and section groups.
I don't which is right.
@qiaoxingxing thanks for reporting the issue. The Connect bug probably has the right information.
@davidfowl @danroth27 who could we talk to confirm the config section behavior for ASP.NET? Thanks.
@csharpfritz Can you help direct this to the right folks?
We should connect with @StephenMolloy and @HongGit for triage
Can confirm that this bug affects Web.config files of ASP.NET MVC5 projects target .net4.7.1
will this be fixed?
Action on this problem would appear justified given the amount of angst it seems to be causing:
https://stackoverflow.com/questions/4030891/how-to-prevent-inheritance-for-web-config-file-for-configsections
https://stackoverflow.com/questions/1572326/how-to-stop-inheritance-of-configsectionsin-web-config
https://stackoverflow.com/questions/367282/disable-web-config-inheritance
https://stackoverflow.com/questions/23367347/entry-has-already-been-added-two-separate-app-pools/24260655#24260655
... and that's just a quick glance of the tabs I have open trying to troubleshoot this myself at the moment ...
As the original issue report points out, remove and clear were never implemented. They haven't existed since before 2.0, and I doubt they existed before that. The documentation should be fixed, but I don't see these features being implemented at this point.
There should be a simple solution then to stop inheriting. Nothing works
right now to cover the entire config, not even altering the definition of
the app pool to not allow it.
On Thu, Apr 26, 2018 at 11:15 AM, StephenMolloy notifications@github.com
wrote:
As the original issue report points out, remove and clear were never
implemented. They haven't existed since before 2.0, and I doubt they
existed before that. The documentation should be fixed, but I don't see
these features being implemented at this point.—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/dotnet/docs/issues/3708#issuecomment-384700721, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AI3qr4hFHQfeB9CtORoQ4vlfweveBN0jks5tsfKSgaJpZM4Qf-Ry
.
I am also experiencing this. I don't want to stop inheritance from the machine.config side--I want to override this section on the web.config side, just as qiaoxingxing wrote.
Still having this problem, and the documentation is still wrong. Can that at least be corrected?
These will never be implemented. So please don't hold out hope that they will.
The docs should be updated though. @Rick-Anderson, do you know who would be able to fix the docs to reflect that 'remove' and 'clear' aren't a thing in the 'configSections' area of config?
@StephenMolloy I can take care of it.
@gewarren my plan is to update the remarks to say these elements do not clear/remove . I'll delete the Example
In Configuration file, I'll say these don't clear/remove
Most helpful comment
Action on this problem would appear justified given the amount of angst it seems to be causing:
https://stackoverflow.com/questions/4030891/how-to-prevent-inheritance-for-web-config-file-for-configsections
https://stackoverflow.com/questions/1572326/how-to-stop-inheritance-of-configsectionsin-web-config
https://stackoverflow.com/questions/367282/disable-web-config-inheritance
https://stackoverflow.com/questions/23367347/entry-has-already-been-added-two-separate-app-pools/24260655#24260655
... and that's just a quick glance of the tabs I have open trying to troubleshoot this myself at the moment ...