部署win服务时出现下面的问题:

在事件查看器中看到如下错误:

日志名称: Application
来源: ***调度服务
日期: 2014/5/21 12:53:21
事件 ID: 0
任务类别: 无
级别: 错误
关键字: 经典
用户: 暂缺
计算机: ams-webserver
描述:
Service cannot be started. Achievo.Utility.DataAccess.DbException: 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.

ConnectionString:
Data Source=***;User ID=***;Password=***;Enlist=false;Pooling=True;Min Pool Size=1;Max Pool Size=100

CommandText:
...

FieldName DBType FieldValue FieldType

---> System.InvalidOperationException: Attempt to load Oracle client libraries threw BadImageFormatException. This problem will occur when running in 64 bit mode w...
事件 Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="***调度服务" />
<EventID Qualifiers="0">0</EventID>
<Level>2</Level>
<Task>0</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2014-05-21T04:53:21.000000000Z" />
<EventRecordID>1334</EventRecordID>
<Channel>Application</Channel>
<Computer>ams-webserver</Computer>
<Security />
</System>
<EventData>
<Data>Service cannot be started. Achievo.Utility.DataAccess.DbException: 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.

ConnectionString:
...

CommandText:
...

FieldName DBType FieldValue FieldType

---&gt; System.InvalidOperationException: Attempt to load Oracle client libraries threw BadImageFormatException. This problem will occur when running in 64 bit mode w...</Data>
</EventData>
</Event>

解决方案:

这个是因为本身机器上装的是64未的操作系统,而这个机器上装的却是32位的Oracle客户端。所以会报这样的错误。

网上查到的很多都是下载什么Oracle的client多少版本,然后再去用一堆繁杂的配置步骤,或者说是由于权限问题,要用管理员运行这个程序或者给这个win服务运行的程序.exe文件赋予权限或者兼容之类的操作。

其实这些都是不一定能解决问题的,最好的方法就是重新编译这个win服务所运行的.exe项目。然后再把生成X86的.exe文件替换原来的那个exe文件即可。

具体步骤:

1、找到对应的项目,右键-->属性-->生成-->目标平台    设置为“X86”

2、重新生成这个项目

3、将bin文件夹里面的对应的.exe文件覆盖要部署的同名文件

4、安装成功!

This problem will occur when running in 64 bit mode with the 32 bit Oracle client components installed(在64位模式下运行安装了32位的Oracle客户端组件时,会发生此问题)的更多相关文章

  1. This problem will occur when running in 64 bit mode with the 32 bit Oracle client components installed.

    Attempt to load Oracle client libraries threw BadImageFormatException. This problem will occur when ...

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

    System.Data.OracleClient 已经过时了.微软不再支持它. 因此,我建议你为. NET 使用Oracle数据提供程序:ODP.Net. 你可以从以下位置下载: 版本:Release ...

  3. 64位Win7下运行ASP+Access网站的方法

    64位Win7下运行ASP+Access网站的方法 近日系统升级为WIN7 64位之后,突然发现原本运行正常的ASP+ACCESS网站无法正常连接数据库. 网上搜索多次,终于解决了问题,总结了几条经验 ...

  4. [Selenium]Grid模式下运行时打印出当前Case在哪台node机器上运行

    当Case在本地运行成功,在Grid模式下运行失败时,我们需要在Grid模式下进行调试,同时登录远程的node去查看运行的情况. Hub是随机将case分配到某台node上运行的,怎样知道当前的cas ...

  5. 64位linux下rpm安装mysql的5.5.55版本

    昨天同事开了个阿里云环境,让我帮他安装mysql数据库,本想着很简单的一件事,结果还是折腾了一番.坑很多,一路趟过,一个接一个,只能硬着头皮冲. 首先是下载压缩包,因为采用了rpm安装方式,所以下载的 ...

  6. x86架构64位模式下的寄存器列表

    在此列出x86架构处理器在64位模式下的可用寄存器列表,方便查阅- 这里要注意的是,在64位模式下,所有通用寄存器都能访问第8位部分,低16位部分以及低32位部分. 以下是64位模式下AMD64 AB ...

  7. 如果在安装32位oracle 客户端组件时的情况下以64位模式运行,将出现问题

    今天要写个程序,环境是win7+ vs2008+ oracle.首先得保证能连接到数据库.确认代码是没有问题的,但是拿过来直接.报错: “尝试加载 Oracle 客户端库时引发 BadImageFor ...

  8. IIS32位,64位模式下切换

    一.32位模式 1.cscript %systemdrive%\inetpub\adminscripts\adsutil.vbs set w3svc/appPools/enable32bitappon ...

  9. Windows7 64位系统下无法安装网络打印机的解决方法

    背景: 公司一台HP LaserJet 1010 打印机连在一台Windows XP的电脑上,而我的是windows7 64位系统,无法安装驱动解决办法:1:去惠普官网上下载对应的64位驱动(什么Vi ...

随机推荐

  1. scala spark rdd转数据框

    1. http://blog.csdn.net/lw_ghy/article/details/51480358

  2. knn手写识别

    import numpy as np import operator import os #KNN算法 def knn(k,testdata,traindata,labels):#(k,测试样本,训练 ...

  3. Fb 第三方接口

    1.Facebook ID? User ID / https://www.piliapp.com/facebook/id/?url=https%3A%2F%2Fwww.facebook.com%2Fz ...

  4. thymeleaf 拼接字符串与变量

    参考https://www.thymeleaf.org/doc/tutorials/3.0/usingthymeleaf.html <span th:text="'The name o ...

  5. MyBatis高级查询

    -------------------------siwuxie095 MyBatis 高级查询 1.MyBatis 作为一个 ORM 框架,也对 SQL 的高级查询做了支持, MyBatis 高级查 ...

  6. maven不存在jar包解决

    win7环境 下载:https://maven.apache.org/download.cgi 提取文件,并cmd 转到bin目录 假设要添加的jar包是jbarcode-0.2.8.jar, 可执行 ...

  7. 类实现Parcelable接口在Intent中传递

    类实现了Parcelable接口就可以在Intent中传递   只要在类的定义中实现Parcelable接口 代码 package entity; import android.os.Parcel; ...

  8. Fragment----静态创建碎片

    import android.os.Bundle; import android.app.Activity; import android.app.Fragment; import android.a ...

  9. uploadify在chrome下初始化失败,在Firefox下却可以原因探析

    如果没有报错,在其他浏览器下没问题,那就只有一种可能:浏览器flash加载失败,解决办法是,更改浏览器对站点flash的设置.参考下图:

  10. iOS.Dev.Guru

    1. Ricardo Quesada Cocos2d https://github.com/ricardoquesada http://www.elance.com/s/rquesada/ 2. Je ...