1
votes

I Have a Windows 7x64 machine with oracle 11gR2 client installed. I was able to run my c# apps (in ASP .Net Development Server not IIS) which connected to oracle using 'Oracle.DataAccess' until i had to reinstall my VS. Now i get a error

Could not load file or assembly 'Oracle.DataAccess, Version=2.112.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. An attempt was made to load a program with an incorrect format.

I tried reinstalling oracle and VS again but still have the problem. When i run gacutil it says

The Global Assembly Cache contains the following assemblies: Oracle.DataAccess, Version=2.112.1.0, Culture=neutral, PublicKeyToken=89b483f4 29c47342, processorArchitecture=AMD64

fuslow gives the following output

Assembly Binder Log Entry (30/11/2012 @ 12:49:44 PM)
The operation was successful. Bind result: hr = 0x0. The operation completed successfully.
Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll Running under executable C:\Program Files (x86)\Common Files\Microsoft Shared\DevServer\9.0\WebDev.WebServer.exe --- A detailed error log follows.
Pre-bind state information LOG: User = KANISHKA\Administrator
LOG: DisplayName = Oracle.DataAccess (Partial)
LOG: Appbase = file:///D:/Visual Studio Projects/CSharp Projects/Web/eReconciliation Statements/01 - Trunk/eReconciliationStatements/
LOG: Initial PrivatePath = D:\Visual Studio Projects\CSharp Projects\Web\eReconciliation Statements\01 - Trunk\eReconciliationStatements\bin
LOG: Dynamic Base = C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\a5cf2b76
LOG: Cache Base = C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\a5cf2b76 LOG: AppName = acd2b7a
Calling assembly : (Unknown).

LOG: This bind starts in default load context.
LOG: Using application configuration file: D:\Visual Studio Projects\CSharp Projects\Web\eReconciliation Statements\01 - Trunk\eReconciliationStatements\web.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET Files/root/a5cf2b76/acd2b7a/Oracle.DataAccess.DLL.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET Files/root/a5cf2b76/acd2b7a/Oracle.DataAccess/Oracle.DataAccess.DLL.
LOG: Attempting download of new URL file:///D:/Visual Studio Projects/CSharp Projects/Web/eReconciliation Statements/01 - Trunk/eReconciliationStatements/bin/Oracle.DataAccess.DLL.
LOG: Assembly download was successful. Attempting setup of file: D:\Visual Studio Projects\CSharp Projects\Web\eReconciliation Statements\01 - Trunk\eReconciliationStatements\bin\Oracle.DataAccess.dll LOG: Entering download cache setup phase.
LOG: Assembly Name is: Oracle.DataAccess, Version=2.112.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342
LOG: A partially-specified assembly bind succeeded from the application directory. Need to re-apply policy.
LOG: Using application configuration file: D:\Visual Studio Projects\CSharp Projects\Web\eReconciliation Statements\01 - Trunk\eReconciliationStatements\web.config LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
LOG: Post-policy reference: Oracle.DataAccess, Version=2.112.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342
LOG: GAC Lookup was unsuccessful.
WRN: A duplicate assembly was found while copying the assembly item to the cache.
LOG: Binding succeeds. Returns assembly from C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\a5cf2b76\acd2b7a\assembly\dl3\037e6e93\00d336f9_73c1ca01\Oracle.DataAccess.dll.
LOG: Assembly is loaded in default load context.

It says GAC Lookup was unsuccessful. Could any one pls help me on this issue. I have tried making the project run as x64 too.

1
I found out that only web apps are having this problem. I tried running a console and windows forms app which works fine. I did allow permission for everyone to the oracle folder too but no luck.Kanishka

1 Answers

1
votes

Uninstalling 11gR2 64 bit client and installing the 11gR2 32 bit client resolved the issue.