Could not load file or assembly ‘Oracle.DataAccess’ or one of its dependencies


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.

I had this error occur while setting up a web-site on a new web server running IIS7. The web server is running 64-bit and the cause of this error is that app pool that it’s running in needs to be specifically told to allow 32-bit applications/assemblies to run. Here are the steps to fix the issue:

  1. Start the IIS Management Console.
  2. Select the application pool that the site in question is in and choose Advanced Settings.
  3. In the properties dialog, set Enable 32-Bit Applications to True.
  4. Reset IIS (I just went ahead and did this since it was a development/test server… recycling the AppPool may suffice, you’ll have to test and see). If anybody just recycling works let me know and I’ll update this post. :)