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

Solution 1:

Try this: Open IIS Manager, change application pool's advance setting, change Enable 32 bit Application to false.

Solution 2:

I found the solution with following steps:

  • remove the Oracle.DataAcces.dll reference,
    and add a fresh reference to:
    C:\windows\assembly\GAC\Oracle.DataAccess\X.XXX.X.XX__89b483f429c47342/oracle.dataaccess.dll
  • Make local copy= false.

Hope it helps

Solution 3:

You may need to enable 32-bit applications in your AppPool. Go to > 'Application Pool' in IIS => right click your app pool => advance setting => 'enable 32 bit application' to true.

Please don't forget to restart your app pool and your corresponding application pointing to that app pool.

Solution 4:

If you are using IIS Express and VS 2017:

Go to the Web Application Properties > Web Tab > Servers Section > And change the Bitness to x64.