Oracle.DataAccess.dll can not be located though it exists

When I browse ASP.Net application developed in Visual Studio 2008 on IIS 7.5(Windows Server 2008 R2 x64) I get configuration error stating that Oracle.DataAccess, Version=2.111.7.20 file could not be located. I’ve already installed Oracle Data Provider for .NET which contains the file. When I setup ODP.net it places the dll files into c:app….odp.netPublisherPolicy folder. I just in case copied those files to C:WindowsMicrosoftFramework folder too, but still I got the same error. Could someone please help me solve this issue? Any help is greatly appreciated

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

The ODP.NET installation can be very tricky. There are many things that can go wrong:

  • You can have a version mismatch (2.111.7.20 vs 2.112.1.0 vs. 2.112.2.0).
  • You can have a mismatch between 32 and 64 bit.
  • The .NET DLL might exists but one of the dependencies is not found.

Try to check the 32/64 bit mismatch first. In IIS, you can configure whether your web application runs as 32 or 64 bit. To check it, have a look at the task manager and see whether the w3wp.exe process has the *32 mark. Then go to C:WindowsAssembly in the file explorer. It’s a special view that display the GAC. If it says x86 in the last column on the row Oracle.DataAccess, then it’s 32 bit. If it says AMD64, then it’s 64 bit.

On the same row, you’ll also find the exact version number. Check in VisualStudio, whether the ASP.NET project uses the same one.

If I’m not mistaken, the main dependency of Oracle.DataAccess.dll is OraOps11w.dll, which should be available in the BIN directory of the Oracle client directory. This directory is usually located via the registry (HKLMSOFTWAREORACLEODP.NET<version>DllPath). Make sure you look at the registry of the correct bitness (32 vs 64 bit).

There are more things that can go. But these here usually solve the problem.


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x