Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: IIS7 ASP.NET
Hi All,
 
I have installed a Web application on IIS 7.0 windows server 2008 R2 64 bit OS
I am refering a oracle.DataAccess.dll
When i try to acess the application i am getting the below message
"Could not load file or assembly 'Oracle.DataAccess' or one of its dependencies. An attempt was made to load a program with an incorrect format.".
 
Please help me.
 
Thanks in Advance.
Posted 7-Apr-11 0:56am
Edited 11-Jul-11 19:04pm
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 4

It seems the Oracle Data Access Component installation process using the "11.2 Release 3 (11.2.0.2.1) with Xcopy Deployment" version is broken. To fix this you must register the missing assemblies in the GAC. To do this for this specific version run these commands from within an administrator console:
 
md C:\Windows\assembly\GAC_32\Oracle.DataAccess\4.112.2.0__89b483f429c47342\
 
copy %ORACLE_HOME%\odp.net\bin\4\Oracle.DataAccess.dll C:\Windows\assembly\GAC_32\Oracle.DataAccess\4.112.2.0__89b483f429c47342\
 
md C:\Windows\assembly\GAC_32\Oracle.Web\4.112.2.0__89b483f429c47342\
 
copy %ORACLE_HOME%\asp.net\bin\4\oracle.web.dll C:\Windows\assembly\GAC_32\Oracle.Web\4.112.2.0__89b483f429c47342\
 

Note that this registers only the DLL's but not other languages resources. So, if you are using any another language than English (de, es, fr, it, ja, ko, pt-BR, zh-CHS, and zh-CHT), then you need to register these as well using the corresponding resource file.
 
If you have Visual Studio installed on the machine, you can issue the following commands instead:
 
gacutil /i %ORACLE_HOME%\odp.net\bin\4\Oracle.DataAccess.dll
gacutil /i %ORACLE_HOME%\asp.net\bin\4\oracle.web.dll
 
Note: look for gacutil.exe under the Visual Studio installation folder for it.
 
Hope this helps.
 
katrash
  Permalink  
Comments
Fedor Steeman at 22-Aug-13 4:17am
   
Didn't work at first, but then I just 'bombarded' the GAC with all the versions of these dll's I could find on my computer. Thank you SO much for this hint! This was killing me! The problems originated when I tried to install and then de-install some Oracle components and decided to 'clean up things' a little in the process.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 5

hi
make sure that you have more than one default application pools but you should set the 32-bit to your active default pool
  Permalink  
Comments
Thando Khumalo at 13-Nov-12 8:31am
   
Hey
Am using a 64-bit but i get the same error message
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

There can be two things. Either you have not put the ODP dll in the website folder or it is 32 bit on 64 bit computer or vice versa. Please check that.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 6

  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 9

I switched to the Managed ODP.NET assemblies. I also had to clear out all files from IIS apps that were using the older assemblies.
 
http://www.oracle.com/technetwork/issue-archive/2014/14-mar/o24odp-2147205.html
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web03 | 2.8.141022.1 | Last Updated 14 Mar 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100