0
   `[HttpGet]
    [Route("allJobStatuses")]
    public IHttpActionResult GetAllJobStatuses()
    {
        //Getting exception here
        var allJobStatuses =
            DataContext.RefAllJobStatuses.Where(
                j =>
                    j.IsActiveFlag.Equals(DataConstants.True) &&
                    (j.Key.Equals("inprogress") || 
                    j.Key.Equals("completed") || j.Key.Equals("started")))
                    .Select(x => new { key = x.Key, value = x.Value });
        return Ok(allJobStatuses);
    }`

One of our Dot Net Project to which I recently joined using Entity framework using Oracle DB. But when I run application it breaks with an exception

"Failed to find or load registered .Net Data Provider".

I have installed ODAC with ODT, Xcopy ODAC all. I searched everywhere on the internet but none of them worked for me. I am not sure what to do.

Things I tried

1) Checking machine.config

2) Providing path in System Variables.

3) Checked Registry keys.

4)Checked DLL in GAC.

Please help me to solve my issue.

  • Did you install the 32-bit or 64-bit version of Oracle? What did you set in your project (32/64 bit must match). Did you install more than one Oracle Client? (often this creates trouble). Please show use your code where you get the error. – Wernfried Domscheit Aug 30 '19 at 07:15
  • @WernfriedDomscheit My System is having 64 bit configuration. Initially I have installed 64 bit version of ODAC with ODT (Ref Lin: https://www.oracle.com/database/technologies/dotnet-utilsoft-downloads.html) Later Installed both 32 & 64 bit version of XCopy ODAC , But issue still persists. Since the exception is very generic I am not able get deep into this issue to figure out what is the problem – Harikrishna Aug 30 '19 at 08:13
  • Remove all Oracle installations [How to uninstall / completely remove Oracle](https://stackoverflow.com/questions/8450726/how-to-uninstall-completely-remove-oracle-11g-client) may help if you have problems. Then, if you like to install both 32-bit and 64-bit follow this instruction: https://stackoverflow.com/questions/24104210/badimageformatexception-this-will-occur-when-running-in-64-bit-mode-with-the-32#24120100 – Wernfried Domscheit Aug 30 '19 at 15:12
  • Thanks @WernfriedDomscheit It is working now . I have completely removed all the prior oracle installations by closely following the answers by all in the post which you have shared.Also I had to check a check box while installing via OUI which enables configuration of settings machine wide (ie. machine.config ) & inserts all the related DLLs to GAC. – Harikrishna Aug 31 '19 at 11:39

0 Answers0