locked
How to connect ODP.NET 4.0 with ASP.NET website on a 64bit machine? RRS feed

  • Question

  • User-1439170524 posted
    I am trying to run my ASP.NET 4.0 WebSite using the ODP.NET 4.0 Client in Windows 7 64 bit machine..but no luck so far.

    I have downloaded the ODP.NET 4.0 from

    > http://www.oracle.com/technetwork/database/windows/downloads/index-090165.html

    and installed using the instructions provided.

    I am able to see both the Oracle.DataAccess.dll and Oracle.Web.dll in

    > C:\Windows\Microsoft.NET\assembly\GAC_64\Oracle.DataAccess\v4.0_4.112.2.0__89b483f429c47342
    and
    > C:\Windows\Microsoft.NET\assembly\GAC_64\Oracle.Web\v4.0_4.112.2.0__89b483f429c47342

    respectively.

    The problem is when I try to Add the reference to the website, I am not able to see them in GAC ( I mean to say in the .NET tab..where all the dlls in GAC are shown)

    I somehow referenced them from my local system..

    But after adding the reference the following entries are created in the web.config file.

    > **<compilation debug="true" targetFramework="4.0">
    <assemblies>
    *<add assembly="Oracle.DataAccess, Version=4.112.2.0, Culture=neutral, PublicKeyToken=89B483F429C47342"/>*
    <add assembly="Oracle.Web, Version=4.112.2.0, Culture=neutral, PublicKeyToken=89B483F429C47342"/>
    </assemblies>
    </compilation>**

    And the problem is..
    When I try to build the project it fails giving me an error stating that

    > **Could not load file or assembly 'Oracle.DataAccess, Version=4.112.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The system cannot find the file specified**.

    The reason I am thinking it is not finding the file is because it is looking in the GAC folder(C:Windows\Assembly) and as they are not present ..it is throwing the compile time error.

    But technically the files must be located in the GAC64 folder(C:\Windows\Microsoft.NET\assembly\GAC_64\Oracle.DataAccess\v4.0_4.112.2.0__89b483f429c47342) and the dll is present there.

    I don't know how to resolve this error.

    Note: I have to run this in 64 bit machine and that too by setting the Enable 32 bit Applications flag to false in the IIS.

    Any Help would be greatly appreciated...Please help me in resolving this error..Pour in your ideas.

    Thanks..
    Wednesday, June 8, 2011 9:55 AM

Answers

  • User269602965 posted

    get the Oracle.DataAccess.dll  4.0 64-bit version from your 64-bit ODAC installation client.

    put it in the application /BIN folder

    create a reference to the Oracle.DataAccess.dll in the /BIN folder and set to LOCAL=TRUE

    remove the web.config oracle assemblies references

    explicitly compile the application as 64-bit.

    make sure IIS is configured to run explicitly in 64-bit mode

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, June 8, 2011 10:03 PM