解决BadImageFormatException错误

Windows server 2008 + oracle 9i(32位)环境下部署webservice报以下下错误: 

数据连接不成功,请检查该数据库是否已启动尝试加载oracle客户端时引发BadImageFormatException.如果在安装32位Oracle客户端组件的情况下以64位模式运行,将出现此问题

  The Problem in english is :
       "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"

解决方法:

第一步

1. 下载instantclient-basic-win-x86-64-11.1.0.7.0.zip,并解压,如C:\instantclient-basic-win-x86-64-11.1\instantclient_11_1(这个部分也是必须的,根据实际情况的不同进行修改)。

2. 在系统的环境变量PATH中加入以上路径。

3. 重启电脑

第二步  通过第一步的修改,BadImageFormatException错误应该不会在报了;如果经过第一步操作后仍然报 TNS 无法解析的错误,需要对IIS进行下面这个配置修改 选中应用程序池-->高级设置-->启用32位应用程序改为 true

posted on 2013-07-26 12:07  tont  阅读(1509)  评论(0编辑  收藏  举报

导航