How to correctly deploy Oracle.DataAccess.dll with ASP.NET app How to correctly deploy Oracle.DataAccess.dll with ASP.NET app oracle oracle

How to correctly deploy Oracle.DataAccess.dll with ASP.NET app


Keep in mind it only uses the dll for the reference. When the code actually calls the functions inside to connect to Oracle - .net uses the provider classes to get the usage (interface) for the Oracle client from the oracle installation directory.

That being said - in our applications - we just deploy the correct version in the bin folder based on the bit level of the OS. We have to do this since our apps support both Oracle and Sql - and the references would break for our Sql clients if the dll was not there.


One cause of this problem that we have found is when your web project does not directly reference Oracle.DataAccess.dll, but does reference another project that references it. This happens even when Copy Local is false on the referenced project.

The solution we found to work is to add the reference directly to your web project, and then set its reference to Copy Local to false.