2

This is the scenario:

I have an ASP.NET application that is has the latest Oracle DDLs (64) bit.

I am running it locally on a Windows 7 machine. It runs fine.

When I publish to a server running IIS from a Windows 7 machine, it gives me this error http://prntscr.com/2hwiaf

When I publish the same application from a Windows XP machine, it works fine.

I checked the server and it has the latest Oracle. 64 bit. I checked in the GAC.

Any ideas?

asokda
  • 35
  • 1
  • 3

1 Answers1

3

The problem is that some code you running is compiled differently then other. If any of your components are 32bit and oracle dll is 64bit you will have this issue. Also make sure that your app pool is setup properly. If you don't run 32bit code, make sure "Enable 32-bit applications" is set to false.

EDIT

You've said "Oracle dll*s*". Use corflags and make sure all of them are x64. And make sure Oracle client that you have on server is also x64. You may have 32 bit client and try to connect via 64 bit ODP.NET - and this is a problem.

I would put as priority - check if Ora client matches Ora Dll's in format

T.S.
  • 18,195
  • 11
  • 58
  • 78
  • No that is not it. I made sure it is 64bit. – asokda Jan 09 '14 at 20:41
  • 2
    My friend, Any time you have "An attempt was made to load a program with an `incorrect format`" - this is bitness incompatibility. Did you run `corflags` on the dlls you use? In the server IIS, check the "Enable 32-bit applications" to false. – T.S. Jan 09 '14 at 21:04
  • Hey T.S. how are you?. I having the same problem, tried everything but it is not working for me. Can take a look: https://stackoverflow.com/questions/66369882/could-not-load-file-or-assembly-oracle-dataaccess-version-2-112-1-0-culture-n?noredirect=1#comment117364925_66369882? – JustToKnow Feb 26 '21 at 20:37