views:

67

answers:

1

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:

  • The bin folder has read & execute permissions for everyone
  • The DLL's are unblocked (windows 7)
  • Problem occurs with both Visual Studio Development Server and IIS 7
  • I've also tested this on a machine with Oracle client tools installed and that works

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

Anyone has a clue on what I am missing?

+2  A: 

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.

Patrick McDonald
Hi, thanks for looking into this but the solution I'm looking for is _"without client tools"_. That's what the Oracle Instant Client is created for. I guess if it already works in a test project context, it should work for a web application as well...
Koen
That should not be necessary. In the .NET world, if the binaries are right there (xcopied) in the application folder ("bin" in my and most cases), they should be found (and they are there, I obviously checked and double checked). The bin folder is always the first place where the .NET runtime looks for dependencies. It works the same way in the Test project...
Koen
Except an ASP.NET Web Application copies its DLLs to some Temporary ASP.NET Files folder to run them, so the Oracle DLLs may actually be in a different directory to your program DLLs
Patrick McDonald
I forgot about that, thanks...
Koen