Currently I am trying to move my application from old server to new one. For the
same purpose I am trying to run my application in test server.
Application executes everyday and runs fine in production server.
But when I test to run the application in test server I got this error
System.InvalidOperationException: Attempt to load Oracle client libraries threw BadImageFormatException. This problem will occur when running in 64 bit mode with the 32 bit Oracle client components installed. ---> System.BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B) at System.Data.Common.
What do i do now to solve the issue?
Thank you
Bikesh SrivastavaPosted Nov 13, 2016, 1:26 PM
This can have several causes, the most likely is that you are trying to load a 32bit managed dll on a 64 bit machine, or vice versa.
It can also mean that a dll you are dynamically loading is not a native dll, or that the dll file is corrupted.
It may mean that you have a dll which is using a higher version of the .Net framework than some other dll that is using it, if you rebuilt a particular component with a different version for example.
This question covers similar ground, as does this one which also suggests a way to force your 64bit app to run in 32bit mode so it can load the 32bit dependency.
Nepethya RanaPosted Nov 15, 2016, 11:38 AM