Problem running web application . net with oracle. Duplicate key

Asked

Viewed 227 times

1

Good afternoon, I implemented a Mvc app that uses Oracle access through Oracle.Manageddataaccess version :4.122.19.1. But received the following message from IIS when running the app:

Erro de Configuração       Há uma seção 'oracle.manageddataaccess.client' duplicada definida

The source of the error was Section which is added to web.config when installing oracle:

 <section name="oracle.manageddataaccess.client" type="OracleInternal.Common.ODPMSectionHandler, Oracle.ManagedDataAccess, Version=4.122.19.0, Culture=neutral, PublicKeyToken=89b483f429c47342" />

While doing some research I identified that the error occurred due to web.config being set to version 4.122.19.0 and machine.config (C: Windows Microsoft.NET Framework v4.0.30319 Config) being configured a different version. When setting the version of the machine.config identical to the application it runs without problem. But whenever I act with another project, the same error occurs, and it is always necessary to manually change the machine.config file..

Any suggestions on how to solve this problem, all frameworks have been reinstalled, oracle is running perfectly on the machine.

1 answer

2


The error is related to Oracle Data Provider for .NET. There is the managed and unmanaged driver. You are using the Managed driver, and since you need to run several applications with different versions, you should use the unmanaged driver.

A simple way to check the driver is in the machine.config itself, where the managed shows the Section: oracle.dataaccess.client already in unmanaged appears: oracle.manageddataaccess.client.

Documentation where I found the solution:https://docs.oracle.com/cd/E48297_01/doc/win.121/e41125/featConfig.htm

  • It is correct, on the computer of a developer next to it, that the project loads and does not need to edit the machine.config (behavior I seek) in the file displays the <Section name="oracle.dataaccess.client" ...>. I’ll change the versions here, thank you.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.