c# – Deploy odp.net 11g application in a 10g IIS server enviroment – Education Career Blog

I have developed a C# 3.5 Mvc 1.0 application using oracle 11gR2 client which uses odp .net I want to deploy it in my IIS7 server which has oracle client 10g which uses odp.net . I am getting the following error

Could not load file or assembly
‘Oracle.DataAccess, Version=,
PublicKeyToken=89b483f429c47342’ or
one of its dependencies. The system
cannot find the file specified.

I tried copying the 11g Oracle.DataAccess.dll to the bin folder of my project then it gives the following error

The type initializer for
threw an exception.


The easiest way is to install the the oracle odp.net package with Xcopy Deployment. This installs an instant client, check the readme.txt for installation instructions.
But I have found out that the current xcopy package doesn’t support 64bit which is due in November. The workaround is to build your assembles for x86 target platform. This only applies if you are deploying to windows server 2008 x64.
It is not sufficient to copy the Oracle.DataAccess.dll.

Leave a Comment