My ASP.NET application runs on a Windows Server 2008 R2 server. Oracle 11g is installed.
I deployed this application to a Windows Server 2016 server. Oracle 12c is installed in this server (11g is not supported).
When I run the application, I get this error:
Could not load file or assembly Oracle.DataAccess
If I copy Oracle 11g dll (Oracle.DataAccess.dll
) to application's bin folder, I see this message:
The provide is not compatible with the version of Oracle client
Is there any way to make this application run without installing Oracle 11g or changing application code?
If i understand well your application is linked to 11gR2 dll of Oracle.DataAccess.dll.
Can you check the version of the dll that is in your path (probably in the GAC, but not always) ?
What do you have in this section of Web.config (sample taken from my web site) ? Does this match the dll in your path ? :
<runtime>
<!-- This prevents the Windows Event Log from frequently logging that HMAC1 is being used (when the other party needs it). -->
<legacyHMACWarning enabled="0" />
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<!-- Oracle -->
<dependentAssembly>
<assemblyIdentity name="Oracle.DataAccess" publicKeyToken="89B483F429C47342" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.65535.65535.65535" newVersion="4.122.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Oracle.ManagedDataAccess" publicKeyToken="89b483f429c47342" culture="neutral" />
<bindingRedirect oldVersion="4.0.0.0 - 4.65535.65535.65535" newVersion="4.122.1.0" />
</dependentAssembly>
Above I am remapping all versions of the driver to the driver installed on my server. It usually works fine, unless you are activelly using something that is only present in a "up" version.
Be sure to check the version of your dll (the version above is for a a 12.2 driver).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With