Skip to Main Content

ODP.NET

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Oracle.DataAccess.dll not loading in 64 - bit OS

1004598Apr 22 2013 — edited Apr 24 2013
Hi All

I have a console application that needs to be scheduled in task manager. My system is 32-bit operating system and I’m using Oracle.DataAccess.dll in my application to establish connection to the oracle db. The version is 2.112.1.0 and the processor architecture of this dll in C:\Windows\Assembly is x86. In my local m/c this dll works fine with all 3 build and target platforms – x64, x86 or AnyCPU. But when I copy the files to my staging server which is a 64-bit OS I’m getting the following exception. (Note: I’m also having Oracle.DataAccess version 10.2.0.100 which is also x86 available in C:\Windows\Assembly)

System.BadImageFormatException: Could not load file or assembly 'Oracle.DataAccess, Version=2.112.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. An attempt was made to load a program with an incorrect format.
File name: 'Oracle.DataAccess, Version=2.112.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342' at

Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
Running under executable D:\ProjectFolder\MyExecutable.exe
Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
Running under executable D:\ ProjectFolder\MyExecutable.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: User = UserId
LOG: DisplayName = Oracle.DataAccess, Version=2.112.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342
(Fully-specified)
LOG: Appbase = file:///D:/ ProjectFolder/
LOG: Initial PrivatePath = NULL
Calling assembly : MyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: D:\ ProjectFolder\MyExecutable.exe.Config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Post-policy reference: Oracle.DataAccess, Version=2.112.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342
LOG: Attempting download of new URL file:///D:/ ProjectFolder/ Oracle.DataAccess.DLL.
ERR: Failed to complete setup of assembly (hr = 0x8007000b). Probing terminated.

I have tried to build the application to target AnyCPU / x64 / x86. It fails in all 3 scenarios.
There are other applications in the staging server where Oracle connection can be established. So ODP.Net should be registered in the server. So looks like problem with my console app. Does anyone have any idea what could be the problem?

Thanks & Regards,
Sree
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 22 2013
Added on Apr 22 2013
4 comments
20,760 views