-->

Implementing Oracle.Web.dll, Oracle.DataAccess.dll

2019-07-19 00:50发布

问题:

After successfully testing my MVC4 programs using this environment

I tried to publish it to 64-bit Windows 2008 Server with the IIS that disallows 32 bit apps, then I start getting stuck with the exception : the referenced dll's dependencies cannot be found!

I tried every advice the internet can give me including modifying web.config to reflect their dlls' on deploy-to server win 2008 using global cache cmd's on the prompt!

Yet nothing works. 32-bit is working but 64-bit is flat broke!

回答1:

First, I stopped messing around the web.config. Then, I re-installed Oracle 11g 64 on my Windows 2008 server. Finally I placed ODAC on top of 11gx64's installation. The key to success is locating the correct ODAC to match the version of Oracle you have on your system.

http://www.oracle.com/technetwork/database/windows/downloads/index-090165.html

To VERIFY you have the right ODAC installed correctly over oracle 11 g you have to look into [asp.net] and [ODP.net] directories to make sure they BOTH have 2.x's and 4's dirs in each bin and their presence in global cache 64.

Ater solving the ODAC installation problem, I start experimenting with oracle client dll's. I copied the Oracle.DataAccess.dll(64-bit) from bin [2.x] to my app's compiled bin only to watch my program still crashed with the same complaint that it cannot find the dependent DLL's. Then I copied the Oracle.DataAccess.dll from bin [4], then everything WORKS fine!!

Now the remaining question is why 4.112.4 not found in register cache GAC_64 is working great but the set of dll's registered in GAC_64 broke the program? Can't help not being confused.

See the resulting view of the working dlls ==>

If you acquire all those screens I show in this case, your MVC4 apps should fly high with Oracle 11 g 64-bit client! Good luck! I'll share mine with you!