Reputation: 7766
we are developing a windows service which connect to oracle database. We use Oracle ManagedDataAccess from Nuget package. When running the windows service we are receving below error. Tried to get details from stackoverflows and nothing is able to resolve the problem. Our config file is as below
Could not load file or assembly 'Oracle.ManagedDataAccess, Version=4.122.19.1, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies
Config
<?xml version="1.0"?>
<configuration>
<configSections>
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="eClaimsService.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
<section name="oracle.manageddataaccess.client"
type="OracleInternal.Common.ODPMSectionHandler, Oracle.ManagedDataAccess, Version=4.122.19.1, Culture=neutral, PublicKeyToken=89b483f429c47342"/>
</sectionGroup>
</configSections>
<system.data>
<DbProviderFactories>
<remove invariant="Oracle.ManagedDataAccess.Client"/>
<add name="ODP.NET, Managed Driver" invariant="Oracle.ManagedDataAccess.Client" description="Oracle Data Provider for .NET, Managed Driver"
type="Oracle.ManagedDataAccess.Client.OracleClientFactory, Oracle.ManagedDataAccess, Version=4.122.19.1, Culture=neutral, PublicKeyToken=89b483f429c47342"/>
</DbProviderFactories>
</system.data>
<system.web>
<httpRuntime executionTimeout="3600" requestValidationMode="2.0" maxRequestLength="10240"/>
<sessionState mode="InProc" timeout="60"/>
<pages validateRequest="false" />
</system.web>
</configuration>
Upvotes: 4
Views: 10423
Reputation: 11
I resolved this issue when receiving it during a data migration using the Sql server migration assistant tool for oracle by reinstalling the application.
Upvotes: 0
Reputation: 21
I got this error when my App.Config contained an old version of the DLL, I just removed this entry from the App.Config and it worked
Upvotes: 2
Reputation: 1
In my case just go to Visual Studio 20xx Developer Command Prompt and open as Administrator.
Then run the command
C:\Windows\System32>gacutil /u Oracle.ManagedDataAccess
And you are able to uninstall the data successfully.
Now I am able to access application without any error.
Upvotes: 0