I have a ASP.NET 4.0 MVC application using Entity Framework and ODAC r4 22.214.171.124.0. I have Oracle 10g client installed on the server (2003) already. I installed the 32-bit ODAC 4 XCopy deployment to the server using the batch file. So I have two Oracle installs on the computer.
The odac11g32 isn't in the PATH environment variable, and because I have a bunch of web apps using the 10g driver now I don't want to disturb them (if I add the bin directory to the PATH env variable, it breaks my existing apps for some reason).
So I read that I can use the DllPath variable in the web.config file..
+<add name="DllPath" value="C:\Oracle\odac11g32\bin"/>+
I added it along with all the other variables I've seen in the examples, but I still am getting an error when I try to run the application... Unable to load DLL 'OraOps11w.dll': The specified procedure could not be found. (Exception from HRESULT: 0x8007007F)
I used Process Explorer to make sure it was loading the correct DLL from the GAC and there is no oracle.dataaccess.dll in the BIN directory of my application. I used Dependency Walker to make sure that all the supporting DLLs work for the DLL mentioned in the error message (I got an error with shlwapi.dll but the DW docs say thats not an issue because its delay-load or something like that).
[DllNotFoundException: Unable to load DLL 'OraOps11w.dll': The specified procedure could not be found. (Exception from HRESULT: 0x8007007F)]
Oracle.DataAccess.Client.OpsTrace.Trace(UInt32 level, String args) +0
Oracle.DataAccess.Client.OraTrace.Trace(UInt32 TraceLevel, String args) +58
Oracle.DataAccess.Client.OpoErrResManager.GetErrorMesg(Int32 errorcode, String args) +328
Oracle.DataAccess.Client.OracleError..ctor(Int32 errNumber, String dataSrc, String procedure, String errMsg) +82
Oracle.DataAccess.Client.OracleException..ctor(Int32 errCode, String dataSrc, String procedure, String errMsg) +127
Oracle.DataAccess.Client.OracleException..ctor(Int32 errCode) +49
[TypeInitializationException: The type initializer for 'Oracle.DataAccess.Client.OracleClientFactory' threw an exception.]