1

I'm building a project with Oracle Database 11g and VS.Net 2013 (ASP.NEt & C#).

The problem is when i'm trying to create a controller based on one of the Entities contained in my DbContext, appears the following Error:

enter image description here

Error:

Is not possible to retrieve metadata for 'Test1.Models.XX_GL_JOURNALS_VIEW. Is not possible to find data provider.NET for the requested Framewrok.It might not be installed.

This is the window i'm using for creating new Controllers:

enter image description here

This my connection String in webconfig:

<add name="EntitiesOracle" 
connectionString="metadata=res://*/Models.DIGP.csdl|res://*/Models.DIGP.ssdl|res
://*/Models.DIGP.msl;provider=Oracle.ManagedDataAccess.Client;provider 
connection string=&quot;data source=DIGP;password=admin#01;persist security 
info=True;user id=ADMIN&quot;" providerName="System.Data.EntityClient" />

This my DB Context:

using System;
using System.Data.Entity;
using System.Data.Entity.Infrastructure;

public partial class EntitiesOracle : DbContext
{
   public EntitiesOracle()
       : base("name=EntitiesOracle")
   {
   }    
   protected override void OnModelCreating(DbModelBuilder modelBuilder)
   {
       throw new UnintentionalCodeFirstException();
   }

   public DbSet<XX_USER_DIGP> XX_USER_DIGP { get; set; }
   public DbSet<XX_GL_JOURNALS_VIEW> XX_GL_JOURNALS_VIEW { get; set; }
   public DbSet<XX_GL_TRIAL_BALANCE> XX_GL_TRIAL_BALANCE { get; set; }
   public DbSet<XX_GL_TRIAL_BALANCE_DETAIL> XX_GL_TRIAL_BALANCE_DETAIL { >get; set; }
 }

I cannot understand why is failing, because the connection seems working well and my data model is correctly build from database.

Sampath
  • 63,341
  • 64
  • 307
  • 441

1 Answers1

0

It seems your problem is on the Connection String.So just copy the connection string from the app.config to web.config.Hope it'll work for you.

Help : ODP.NET error Unable to find the Requested

Community
  • 1
  • 1
Sampath
  • 63,341
  • 64
  • 307
  • 441
  • Hi Sampath, thanks for your respone but i'm not able to find my app.config file. In my solution automatically VS create two Web.Config one inside of Shared Folder the other one in root. Both had the same info, i copy and paste the same string connections in both, but still is not working. Regards, Ernesto – user3436176 Oct 07 '16 at 20:07
  • please see this : http://stackoverflow.com/questions/17528252/odp-net-error-unable-to-find-the-requested-net-framework-data-provider – Sampath Oct 07 '16 at 20:15
  • Dear @Sampath I've fighting for 2 days trying to follow instructions in different posts including those you described before, but i don't know why the error is still appearing. I don't if is because i'm using MVC 4 with Entity Framework 5 and the ODP version is in 6.0x @_@, i feel lost at this point. – user3436176 Oct 09 '16 at 22:38
  • why don't you try with the latest version ? EF 6.X ? – Sampath Oct 10 '16 at 02:32