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

I had the same issue on a Windows 10 PC. I copied the project from my old computer to the new one, both 64 bits, and I installed the Oracle Client 64 bit on the new machine. I got the same error message, but after trying many solutions to no effect, what actually worked for me was this:
In your Visual Studio (mine is 2017) go to
Tools > Options > Projects and Solutions > Web Projects

On that page, check the option that says:
Use the 64 bit version of IIS Express for Websites and Projects

Leave a Comment