none
Refering X86 System.Data.Oracle Client from 2008 windows server (x64) RRS feed

  • Question

  • Hi,

    I am developing a We b application in 32 bit Windows Vista OS. The development environment is having 32 bit oracle installation. This cofiguration works good for my application and we are able to connect to the Oracle DB.

    In the test server which is a Windows 2008 server, we have 64 bit Oracle installed. The Administration team has told me that the server GAC infact has two versions of  System.Data.Oracle Client  dlls (v2.0.0.0) one for x86 and other one for AMD64.

    Could you please let me know how to use this x86 Oracle DLL instead of AMD64 DLL? Is there any way to do this from config so that no matter configuration in the dev or server environment it will always refer the x86 version DLL?


    Nithin

    Monday, September 30, 2013 1:55 PM

Answers

  • Hi Nithin,

    When build the web application, please set its platform target to x86. If IIS is used as web server, set application run as 32bit application. If we can mark sure our application is running as 32bit application, it will find the correct dll file automatically.

    Best Regards,


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Tuesday, October 1, 2013 6:21 AM
    Moderator
  • In that case, there is no way it is going to pick 64 bit version of oracle dll because a 64 bit DLL cannot be loaded into a 32 bit process.

    Please mark this post as answer if it solved your problem. Happy Programming!

    Wednesday, October 2, 2013 2:37 AM
  • Hi Guys,

    I have managed to make this work by installing both 32 and 64 bit Oracle client in the server.

    Thanks for your replies

    Nithin


    Nithin

    Friday, November 1, 2013 5:53 PM

All replies

  • Hi Nithin,

    When build the web application, please set its platform target to x86. If IIS is used as web server, set application run as 32bit application. If we can mark sure our application is running as 32bit application, it will find the correct dll file automatically.

    Best Regards,


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Tuesday, October 1, 2013 6:21 AM
    Moderator
  • Did you try setting the target platform of your project to Any CPU? By setting it to 'Any CPU', in your x86 machine, the application will run in 32 bit mode and hence correct dll (x86) is chosen. When you the application to your server, the application will run in 64 bit mode and I believe it will automatically pick the AMD64 bit dll of the DLL.

    I hope this helps.


    Please mark this post as answer if it solved your problem. Happy Programming!

    Tuesday, October 1, 2013 4:12 PM
  • Thanks for the reply.

    I have published the application in x86, and the server app pool is 32 bit. So it should be taking the Oracle 32 bit DLL from GAC, but it is not.

    I am trying to connect to my 64 bit Oracle client installed on the server from my 32 bit app pool.

    Please see this

    http://social.msdn.microsoft.com/Forums/en-US/615a5df7-113c-49af-a8c3-9d0e759c6140/trouble-connecting-to-64-bit-oracle-client-from-32-bit-environment



    Nithin

    Tuesday, October 1, 2013 5:47 PM
  • In that case, there is no way it is going to pick 64 bit version of oracle dll because a 64 bit DLL cannot be loaded into a 32 bit process.

    Please mark this post as answer if it solved your problem. Happy Programming!

    Wednesday, October 2, 2013 2:37 AM
  • Hi Guys,

    I have managed to make this work by installing both 32 and 64 bit Oracle client in the server.

    Thanks for your replies

    Nithin


    Nithin

    Friday, November 1, 2013 5:53 PM