Forum Stats

  • 3,874,142 Users
  • 2,266,673 Discussions
  • 7,911,738 Comments

Discussions

Could not load file or assembly 'Oracle.DataAccess' or one of its dependencies. An attempt was made

1f86b123-f1b0-4fbb-9d02-3f06f02691b4
edited Jan 3, 2019 2:17PM in ODP.NET

Hi,

I am working with ASP.Net with Framework 4.0  and Created a web application using MVC3. I have installed ODP.net  for using Oracle.DataAcess to communicate with Oracle data base, my operating system is Linux server  and I have installed Oracle client.

in my application I am giving reference to Oracle.DataAccess.dll from C:\Oracle\product\4.2.0\client_1\ODP.NET\bin\4\

when I run the application in Visual studio 2015 I am getting an error as

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.

Please help !!!

Answers

  • Alex Keh-Oracle
    Alex Keh-Oracle Posts: 3,154 Employee
    edited Jan 3, 2019 2:17PM

    Most likely, your application bitness and ODP.NET bitness do not match. For example, you may be running .NET as an x64 app, but you have installed a 32-bit Oracle Client. Or you are running x86 .NET and using 64-bit Oracle Client. Try changing the bitness of your .NET app and try running again.

  • User_GT09E
    User_GT09E Member Posts: 1 Green Ribbon

    I am facing this issue, i have installed oracle client 19c both 32 ND 64 BIT. Still facing same isssue,

    Please help me on this