Oracle ODP.NET error
an error occurred creating the configuration section handler for oracle manageddataaccess client
the type initializer for 'oracleinternal common providerconfig threw an exception
dbproviderfactories oracle manageddataaccess client
I have a VS 2012 Web Project Up. I have ODP.NET installed as we are an Oracle Workshop. I inherited a project that uses Oracle.ManagedAccess.Data and EF.
Upon running the project in VS 2012, I get the following error:
There is a duplicate 'oracle.manageddataaccess.client' section defined..
The solution was to disable the following line in web.config
<!--<section name="oracle.manageddataaccess.client" type="OracleInternal.Common.ODPMSectionHandler, Oracle.ManagedDataAccess, Version=188.8.131.52, Culture=neutral, PublicKeyToken=89b483f429c47342" />-->
Which was fine. The project compiled but upon executing a simple command such as getting a password back where it has to read the database another error was tripped up:
System.Data.ConstraintException: Column 'InvariantName' is constrained to be unique. Value 'Oracle.ManagedDataAccess.Client' is already present.
Now I'm aware that the error is tripped up by ODP.NET and having it exist in the GAC thus the double error reporting.
Is there another line I should be commenting out or is there a way to disable ODP.NET briefly? I don't want to install that client as I use it for other projects.
I found the following on the Oracle site regarding the "There is a duplicate 'oracle.manageddataaccess.client' section defined.":
If your application is a web application and the above entry was added to a web.config and the same config section handler for "oracle.manageddataaccess.client" also exists in machine.config but the "Version" attribute values are different, an error message of "There is a duplicate 'oracle.manageddataaccess.client' section defined." may be observed at runtime. If so, the config section handler entry in the machine.config for "oracle.manageddataaccess.client" has to be removed from the machine.config for the web application to not encounter this error. But given that there may be other applications on the machine that depended on this entry in the machine.config, this config section handler entry may need to be moved to all of the application's .NET config file on that machine that depend on it.
I hope it helps.
OracleError Class, If there are multiple errors, ODP.NET only returns the first error message on the stack. Example // C# using System; using System.Data; using Oracle.DataAccess. This discussion is archived. 1 Reply Latest reply Latest reply
I was getting the same error for an ASP.Net MVC project. I found that there is a version mismatch for
oracle.manageddataaccess.client in the
Web.config of the project, and
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config, and C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config.
Version=184.108.40.206 in the
Version=220.127.116.11 in the
I updated the version(replaced
oracle.manageddataaccess.client with 18.104.22.168) in both the
machine.config, and the problem resolved.
OracleException Class, The OracleException class represents an exception that is thrown when the Oracle Data Provider for .NET encounters an error. Each OracleException object I am trying to use Oracle Universal Installer to deinstall the two Oracle Homes on my pc. I think they have become corrupted because I installed Oracle Developer Tools for Visual Studio 2017 in the wrong way (I picked "For beginners" on this page: Oracle .NET Software Downloads).
In my case I have multiple projects. One a Entity Framework data model, another which is an WCF Service using the EF Model, a WPF project using the WCF Service, and finally, my ASP.NET MVC prject, using the Entity Framework Data model directly. We use Oracle and had a Nuget package oracle.manageddata. I used Version 12.1.21 in all the others, except my ASP project (which had version 12.1.22). After downgrading to what the other projects are using, my Web ASP is running again. Using different Nuget versions in various projects, in the same solution, doesn't seem to be such a good idea.
Configuring Oracle Data Provider for .NET, resulting in client connection establishment failure. Not setting SQLNET.ENCRYPTION_SERVER or setting it to any other valid value is supported. ODP.NET ODP.NET, Managed Driver supports SSL 3.0 and TLS 1.0, 1.1, and 1.2. ODP.NET, Unmanaged Driver supports the same SSL and TLS versions as the Oracle Database Client version it is certified with. The SSL/TLS client can ensure that the distinguished name (DN) is correct for the database server it is trying to connect to.
Configuring Oracle Data Provider for .NET, config but the Version attribute values are different, an error message of "There is a duplicate oracle.manageddataaccess.client section defined." may be observed Oracle Data Provider for .NET. Oracle Data Provider for .NET (ODP.NET) features optimized ADO.NET data access to the Oracle database. ODP.NET allows developers to take advantage of advanced Oracle database functionality, including Real Application Clusters, self-tuning statement cache, and Fast Connection Failover.
Oracle Data Provider for .NET, Managed Driver Configuration, To avoid unnecessary connection attempts to an unavailable service which will result in an error, ODP.NET, Managed and Unmanaged Drivers block any A simple ArrayList that holds a list of OracleError s. If there are multiple errors, ODP.NET only returns the first error message on the stack.
ODP.NET FAQ, NET data provider, but am new to Oracle. Is it easy to learn to use ODP.NET? XACT_E_NOENLIST(0x8004D00A)" error when running an application using ODP.NET, Managed Driver has one set of platform-dependent DLL: Oracle.ManagedDataAccessIOP.dll, which has a 32-bit .NET version and a 64-bit .NET version.While they consist of 100% managed code, they call APIs outside of .NET, which is why they are platform dependent.
- thanks! I deleted all oracle sections from machine.config files and finally was able to run project and do migrations
- I don't have an entry in the machine.config file for "oracle.manageddataaccess.client" still I'm getting this error. Any suggestions on how to proceed will be helpful.