Tuesday, February 26, 2013

(Solved) 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.

When you publish a ASP.NET application in IIS you may getting 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." To Solve this,


  • Go to IIS
  • Double click the Application Pool
  • Right click the application pool you are using for your application
  • Select Advanced Settings
  • There you can see Enable 32 bit Application set to False
  • Change that to True 
  • It will work now