Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Section or group name 'oracle.manageddataaccess.client' is already defined

Tags:

oracle

after updating the Oracle.ManagedDataAccess dll from version 4.121.1.0 to version 4.121.2.0, since I could not save values of type CLOB in the previous version using NHibernate, on the client machine it gave this error: System.TypeInitializationException: The type initializer for 'OracleInternal.Common.ProviderConfig' threw an exception. ---> System.Configuration.ConfigurationErrorsException: Configuration system failed to initialize ---> 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.

On my development machine this does not occur, I looked at the machine.config files of his machine and this section is not included, I already tried with and without the settings that Nuget added in the app.config, but nothing seems to work. Anyone know how I can resolve this? Thank you

like image 363
Guilherme Oliveira Avatar asked Mar 27 '17 13:03

Guilherme Oliveira


2 Answers

Remove the section with oracle.manageddataaccess.client from your machine.config.

The readme from the NuGet Package tells you to do so.

like image 164
Andreas Gunnerås Avatar answered Sep 30 '22 06:09

Andreas Gunnerås


drop into the app.config and remove or comment this section:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<!-- <configSections>
        <section name="oracle.manageddataaccess.client" type="OracleInternal.Common.ODPMSectionHandler, Oracle.ManagedDataAccess, Version=4.122.18.3, Culture=neutral, PublicKeyToken=89b483f429c47342"/>
</configSections> -->
<startup> 
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
</startup>
<system.data>
like image 28
Merlin051 Avatar answered Sep 30 '22 07:09

Merlin051