Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am getting this error in this line:

conn.open();

as Attempt to load Oracle client libraries threw BadImageFormatException. This problem will occur when running in 64 bit mode with the 32 bit Oracle client components installed.

I am using windows 8 pro 64 bit with oracle 12c 64 bits and visual studio 2010 professional

....none of the solutions I found are working for me...
I cannot find the application pool in IIS and new solution platform from build->configuration manager cannot be created...Active solution platform is in 'Any CPU'..no other options available in dropdown and no new options can be created...

How can I solve this?

Thanks....
Posted
Updated 28-Mar-14 4:33am
v2

Two possibilities:

1) Your code is being compiled to Target x86 only (32-bit) and you're using the 64-bit Oracle client.

2) Your code is being compiled to Target AnyCPU (on a 64-bit machine) or x64 only (64-bit) and you're using the 32-bit Oracle client.

Go into your project Properties, click the Build tab and look at the Platform Target box. If it's Any CPU, change it to x64 IF AND ONLY IF you can verify that you ARE using the 64-bit Oracle client. If it still doesn't work, go back here and change this option to x86.
 
Share this answer
 
Comments
planetz 28-Mar-14 12:47pm    
I have checked it...it is running on 'Any CPU'.....but I do not have any option to change it to x64 or x86...that is my problem....and I cannot add them also....
Dave Kreskowiak 28-Mar-14 15:34pm    
I've NEVER seen that box not be able to select x86, x64 or Any CPU.
Dave Kreskowiak 28-Mar-14 15:35pm    
Are you using an Express Edition of Visual Studio??
planetz 29-Mar-14 0:11am    
I am using professional edition....the drop down only has Any CPU option..nothing else...how can I select anything else then?
Dave Kreskowiak 29-Mar-14 1:31am    
I've never seen it have just the Any CPU option, ever.
Visual Studio is a 32 bit programme.
So if you want to be able to debug you website you need to install the 32 bit Oracle client and set your application pool in the IIS to "Enable 32 bit applications"[^]
 
Share this answer
 
Comments
planetz 19-Apr-14 10:26am    
there is a big list in application pool...how to know which is for my project??
planetz 24-Apr-14 12:16pm    
turning enable 32 bit application true or false in application pool is not helping....
planetz 24-Apr-14 14:12pm    
I tried everything..nothing works...!!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900