locked
Attempt to load Oracle client libraries threw BadImageFormatException. RRS feed

  • Question

  • User-2103146910 posted

    Dear all,
    i was working on 32 bit OS, with 32 bit Oracle client installed and Visual Studio 2015. for some
    reasons i have to change my laptop. now i have 64 bit OS, with 32 bit oracle client (only this should be
    used for some reasons). i am using entityspaces as orm (both 32 and 64bit). after successfuly installation in new laptop when
    i ran my VS solution i found following error

    inner exception "An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)"

    error message "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 have tested following solutions but failed.

    1) go to Tools > Options > Projects and Solutions > Web Projects > check the option that says: Use the 64 bit version of IIS Express for Websites and Projects

    2) Project, properties, Build TAB, select platform target : x86
    Project, clean build, ReBuild solution

    when i changed platform target to x86 my wcf project throwed error and hence cant update the service
    when i changed platform target to x64 my wcf project updated successfully but got abovementioned error on
    application execution.


    => what i have is, 64 bit OS, 32 bit oracle client [bound to use this only], VS 2015, entityspaces 32 or 64 bit
    what should i do so that i can run my application without any errors from visual studio 2015. As i am unable to
    fetch data from oracle at all (using entityspaces).

    i am looking for the solution for 4 days but failed.

    Please give me solution or point out where i am wrong.


    with many thanks

    Wednesday, June 26, 2019 2:29 PM

All replies

  • User753101303 posted

    So it seems you have to force 32 bit mode (use x86 and you unchecked using IIS 64 ?). Which error is then thrown by your WCF service ?

    Wednesday, June 26, 2019 3:06 PM
  • User-2103146910 posted

    Thanks for reply,

    after unchecking or checking using IIS 64, i used 32 bit and 64 bit entity spaces dlls to fetch data from database; getting the same error

    "Failed to load data from the Database. 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."

    from WCF Service.

    kindly help me and tell me your recommendations to get rid of this exception.

    with many thanks

    Monday, August 19, 2019 2:52 PM