Good morning, my application uses oracle.manageddataaccess.client, when installing oracle.managedDataAccess via Nuget, a reference was created in my web.config as below:
<configSections>
<section name="oracle.manageddataaccess.client" type="OracleInternal.Common.ODPMSectionHandler, Oracle.ManagedDataAccess,
Version=4.122.19.1, Culture=neutral, PublicKeyToken=89b483f429c47342" />
</configSections>
For my application to run, I need the identical section in the machine.config file. (Windows \ Microsoft.NET \ Framework \ v4.0.30319 \ Config \ machine.config), machine.config file below:
The problem is that whenever I need to run another application with a different version of oracle, the error occurs with duplicate key, because in web.config a version is configured, and in machine.config, the section is configured with another version. It is always necessary to manually edit the file machine.config and setting the version according to the version of web.config.
What I tried to accomplish to solve the problem was:
allowOverride="true"
in web.config section (Unrecognized Attribute)<clear />
element in section (no success)I found that on other machines where it is not necessary to put the manual version, machine.config uses the section oracle.dataaccess.client
, so I researched is due to using the unmanaged odp.net driver, changing my section for this too did not work.
Would there be any way to override this section? Or use oracle.dataaccess.client
to resolve this issue.
I got it to work by using the following in web.config:
<configSections>
<section name="new.oracle.manageddataaccess.client" type="OracleInternal.Common.ODPMSectionHandler, Oracle.ManagedDataAccess, Version=4.122.19.1, Culture=neutral, PublicKeyToken=89b483f429c47342" />
</configSections>
And later use the new config section:
<new.oracle.manageddataaccess.client>
<version number="*">
<!--Oracle configuration settings-->
</version>
</new.oracle.manageddataaccess.client>