尝试加载Oracle客户端库会引发BadImageFormatException。在安装了32位Oracle客户端组件的64位模式下运行时,将发生此问题。 [英] 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.

查看:656
本文介绍了尝试加载Oracle客户端库会引发BadImageFormatException。在安装了32位Oracle客户端组件的64位模式下运行时,将发生此问题。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到此错误:



conn.open();



尝试加载Oracle客户端库时抛出BadImageFormatException。在安装了32位Oracle客户端组件的64位模式下运行时会出现此问题。



我正在使用带有oracle 12c 64位和视觉的Windows 8 pro 64位studio 2010 professional



....我找到的解决方案都没有为我工作......

我找不到应用程序池在IIS中,无法创建来自build->配置管理器的新解决方案平台......活动解决方案平台位于任何CPU中。下拉列表中没有其他可用选项,也无法创建新选项...



如何解决这个问题?



谢谢....

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....

推荐答案

两种可能性:



1)您的代码仅被编译为Target x86(32位)并且您使用的是64位Oracle客户端。



2)您的代码正在编译为Target AnyCPU(在64位计算机上)或仅x64(64位),并且您正在使用32-位Oracle客户端。



进入项目属性,单击Build选项卡,然后查看Platform Target框。如果是任何CPU,请将其更改为x64 IF并且仅在您可以验证您是否正在使用64位Oracle客户端时。如果它仍然不起作用,请返回此处并将此选项更改为x86。
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.


Visual Studio是一个32位程序。

所以如果你想能够调试您的网站,您需要安装32位Oracle客户端并在IIS中设置您的应用程序池启用32位应用程序 [ ^ ]
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"[^]


这篇关于尝试加载Oracle客户端库会引发BadImageFormatException。在安装了32位Oracle客户端组件的64位模式下运行时,将发生此问题。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆