I've an issue with a service we've got here.
I've had this error :
System.IO.FileNotFoundException : Could not load file or assembly 'Oracle.DataAccess, Version=4.112.4.0, Culture=neutral, PublicKeyToken=X' or one of its dependencies.'
So I guessed I'd add the dll in the bin folder of my project, nothing much, right ?
Then I had this error :
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.
Okay, I've seen this before, just go to the application pool and set "Enable 32bit applications" to true.... Right ?
OpenDBConnection: Error occurred. System.TypeInitializationException:
The type initializer for 'Oracle.DataAccess.Client.OracleConnection' threw an exception.
---> Oracle.DataAccess.Client.OracleException: The provider is not compatible with the version of Oracle client
Okayyy... No problem, let me check : the server is a 2008 R2 enterprise x64. I'll compile to x64 then.
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.
Now, this mess has last for the last few days. I'm getting mad, cause I'm obviously turning in circle but can't figure where the exit is.
I've Oracle 1120_32 and 1120_64 installed (that's 11.2.0.2.0 version), .Net 4.0 installed. I've tried compiling to "any cpu". I've tried setting the dll properties to "Specific version = false", "Copy Local = true", as well as the opposite. I've tried getting old versions of the program and re-compile them after making the needed changes in the code, keeping the old config. I've tried dancing round a cactus singing "Please, Big Bill, Let this DLL be loaded".
I've checked many links, but this happen in a remote environment, so I don't have the option to set a breakpoint or whatever to see WHICH dll the program tries to load, and most links advise to (re)install oracle client on the server, but as I'd have to ask the admin for this, I would rather have the confirmation there's nothing else last to try.
Could someone help please ?