locked
SharePoint 2010 cutom timer job access Oracle 32 bit client RRS feed

  • Question

  • Hi All,

    I have developed SharePoint 2010 custom time job accessing the Oracle client. When I connect to the Oracle client, I'm getting this exception saying "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 then changed the time job to run under 32 bit mode, but I could not even deploy the solution. While deploying itself I'm getting the above exception. Can anyone pls help me. Thank you.

    Tuesday, September 20, 2011 3:56 AM

Answers

  • Hi Vidon,

    it is impossible to load a 32 bit dll into a 64-bit process.

    What I usually do in this situation is to write a 32-bit web service on a dedicated website with an application pool configured for 32-bit and then load the 32-bit dll there.

    The calls to the 32 bit components from the 64-bit app then have to be replaced with the web service calls to the 32-bit web services.

    Alternatively you could also develop a 32-bit COM server hosting the 32 dll - but web services are usually more convenient to develop

    Hope this helps.

    Cheers,
    Stefan


    Microsoft CSS - This post is provided "AS IS" with no warrenties and confers no rights.
    Tuesday, September 20, 2011 12:38 PM
  • Just add to Stefan's response, you can install 64bit Oracle Client to fix the issue.

    Thanks,
    Jinchun Chen


    Jinchun Chen
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff AT microsoft.com(Please replace AT with @)
    Wednesday, September 21, 2011 7:37 AM

All replies

  • Hi Vidon,

    it is impossible to load a 32 bit dll into a 64-bit process.

    What I usually do in this situation is to write a 32-bit web service on a dedicated website with an application pool configured for 32-bit and then load the 32-bit dll there.

    The calls to the 32 bit components from the 64-bit app then have to be replaced with the web service calls to the 32-bit web services.

    Alternatively you could also develop a 32-bit COM server hosting the 32 dll - but web services are usually more convenient to develop

    Hope this helps.

    Cheers,
    Stefan


    Microsoft CSS - This post is provided "AS IS" with no warrenties and confers no rights.
    Tuesday, September 20, 2011 12:38 PM
  • Just add to Stefan's response, you can install 64bit Oracle Client to fix the issue.

    Thanks,
    Jinchun Chen


    Jinchun Chen
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff AT microsoft.com(Please replace AT with @)
    Wednesday, September 21, 2011 7:37 AM