wcforacle-databasenhibernateweb-applicationsinstantclient

Oracle Instant Client with web application


I have a visual studio solution with an ASP.NET 3.5 web application (WCF host) and a test project. I wanted to use the Oracle Instant Client (v11, via NHibernate) to create Oracle connections without having the Oracle client tools installed on every "involved" machine (dev, CI server, test server, production server).

The weird thing is that on my development machine (x86) my tests run without problem, while my web application still gives me the following error message: System.Data.OracleClient requires Oracle client software version 8.1.7 or greater

Things I ruled out already:

I even managed to get the tests running on our x64 CI server (more info).

Anyone has a clue on what I am missing?


Solution

  • I see this error almost every time I set up Oracle on a new machine.

    1. Check that the oracle bin folder is in your path
    2. Give read and execute permission to everyone on the client folder (on my machine C:\oracle\product\10.2.0\client_1)
    3. Changing permissions may not take effect until you reboot your machine.

    EDIT:

    From your comment, steps 2 and 3 are irrelevant for Oracle Instant Client. Hoverer, I would guess that the problem is still that the system cannot find the Oracle Instant Client DLLs. It would be worth putting the location of these DLLs into your path and seeing if this resolves it.

    From http://www.oracle.com/technetwork/database/features/instant-client/index-100365.html

    Installation Instructions

    Installation Steps:

    1. Download the appropriate Instant Client packages for your platform. All installations REQUIRE the Basic or Basic Lite package.

    2. Unzip the packages into a single directory such as "instantclient".

    3. Set the library loading path in your environment to the directory in Step 2 ("instantclient"). On many UNIX platforms, LD_LIBRARY_PATH is the appropriate environment variable. On Windows, PATH should be used.

    4. Start your application and enjoy.