This problem would occur when running in a-bit mode with the-the-bit Oracle client components installed (64-bit operation with 32-bit Ora installed This problem occurs when you CLE a client component)

Source: Internet
Author: User
Tags file permissions

The following issues occur when you deploy the win service:

You see the following error in the Event Viewer:

Journal name: Application
Source: * * * Dispatch service
Date: 2014/5/21 12:53:21
Event id:0
Task Category: None
Level: Error
Keywords: classic
User: N/A
Computer: Ams-webserver
Describe:
Service cannot be started. Achievo.Utility.DataAccess.DbException:Attempt to load Oracle client libraries threw badimageformatexception. This problem would occur when running in a bit mode with the-the-bit Oracle client components installed.

ConnectionString:
Data source=***; User id=***; password=***; Enlist=false; Pooling=true; Min Pool size=1; Max Pool size=100

CommandText:
...

Fieldnamedbtypefieldvaluefieldtype

---> System.InvalidOperationException:Attempt to load Oracle client libraries threw badimageformatexception. This problem would occur when the running in + bit mode w ...
Event Xml:
<event xmlns= "Http://schemas.microsoft.com/win/2004/08/events/event" >
<System>
<provider name= "* * * dispatch service"/>
<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 would occur when running in a bit mode with the-the-bit Oracle client components installed.

ConnectionString:
...

CommandText:
...

Fieldnamedbtypefieldvaluefieldtype

---&gt; System.InvalidOperationException:Attempt to load Oracle client libraries threw badimageformatexception. This problem would occur when running in a bit mode w...</data>
</EventData>
</Event>

Solution:

This is because the machine is loaded with 64 operating systems, and this machine is loaded with a 32-bit Oracle client. So I will report such a mistake.

Many of the online search is to download what Oracle's client version, and then to use a bunch of miscellaneous configuration steps, or because of the permissions problem, to run the program with the administrator or to the win service running program. exe file permissions or compatibility, and other operations.

In fact, these are not necessarily solve the problem, the best way is to recompile the win service to run the. exe project. Then replace the EXE file that generated the X86 with the original EXE file.

Specific steps:

1. Find the corresponding item, right----and the target platform is set to "X86"

2. Regenerate this project

3. Overwrite the corresponding. exe file in the Bin folder with the file with the same name you want to deploy

4, Installation Success!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.