BadImageFormatException. This will occur when running in 64 bit mode with the 32 bit Oracle client components installed

后端 未结 21 2497
南方客
南方客 2020-11-21 13:30

I am getting this error while on of my .Net application are trying to make a connection to oracle database.

The error says that This problem will

21条回答
  •  没有蜡笔的小新
    2020-11-21 13:52

    As apc mentioned that error occurs "when a 32bit dll calls a 64bit dll or vice versa". The problem is that if you have build using AnyCPU and are running on a 64bit environment then the application will run as 64bit. If rebuilding explicitly for 32 and 64 bit is not an option then you could use a microsoft utility called corflags.exe which comes with the Windows SDK. Basically, you can modify a flag in the exe of the program you are executing to tell it to run as 32bit even if the environment is 64bit.

    See here for information on using it

提交回复
热议问题