We have recently been struggling to update our C# applications with the new Oracle dll’s. We create our software for multiple platforms. So our software solution is both a winform desktop application and a ASP.NET MVC webapplication.
Both applications run Oracle 12.1 stand-alone perfectly. We add all necessary Oracle dll’s with the redistribution of our software. So the desktop application has all the dll’s within the MSI and the publish of the website has all the dll’s in the ~\Bin. Making sure that when the website is hosted on IIS the webapplication runs. This way our customers do not need to install Oracle Client.
Now comes the problem, since updating to Oracle 12.2 it’s not possible for us to run the webapplication anymore. The desktop application still runs fine although since Oracle 12.2 we get a Firewall Exception message, if we wan’t to allow our desktop application to connect to the internet.
We didn’t get that message in Oracle 12.1 or below.
We have published our webapplication with all the new Oracle dll’s (the same dll’s as desktop and the same way as for when the webapplication has Oracle 12.1) and since then we are not able anymore to connect to our Oracle databases. We get the error below:
Unable to load DLL 'OraOps12.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
System.TypeInitializationException: The type initializer for 'Oracle.DataAccess.Client.OracleConnection' threw an exception. ---> System.DllNotFoundException: Unable to load DLL 'OraOps12.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
at Oracle.DataAccess.Client.OpsInit.CheckVersionCompatibility(String version)
at Oracle.DataAccess.Client.OracleInit.Initialize()
at Oracle.DataAccess.Client.OracleConnection..cctor()
--- End of inner exception stack trace ---
We have checked, but YES the dll is there. We also put it in different locations to see if this would work but no.
These are the dll's we are using:
The strange thing is that when we copy our desktop application to the server, the desktop application runs fine! The desktop application has the exact same dll’s as the webapplication! The dll’s we are using for both desktop and webapplication are from the XCopy folders of Oracle: http://download.oracle.com/otn/other/ole-oo4o/ODAC122010Xcopy_32bit.zip x86 http://download.oracle.com/otn/other/ole-oo4o/ODAC122010Xcopy_x64.zip x64
There are more people struggling with this issue, here is what we have found so far:
- Oracle 12.2 needs minimum .NET Framework 4.5.2 our server has 4.6 and up
- The rights of the dll’s are set correctly and may be used by IIS
- We have for our x86 webapplication enabled 32-bit application in the Advanced Settings window
- We have set the enviroment making sure the right dll’s are added to the enviroment
- In visual studio we made sure that the references are: Copied if newer and Local copy is set to true
- Our application are full x86 or x64 NOT anyCPU build.
- We have checked our Regedit, Machine.config and GAC for any possible left-over of other Oracle versions.
- Redownloaded the xcopy zip and copied the files again
- Server has DISABLED firewall (development)
Oracle.DataAccess.Client Dependencies this is more or less our method to!
Our server-specs:
- Windows Server 2012R2 DataCenter (clean)
- X64-based pc
- using IIS 8.5
Thanks for reading hopefully someone could help us.
Greetings Leroy