title: ODP.NET error Unable to find the Requested .Net Framework Data Provider
body: <p>I am trying to develop an ASP.NET MVC 4.0 application using Oracle 11g Express and the .NET 4.0 framework. I can connect to the DB using the ODP.NET provider and can also generate my EDMX against the database. What I can't do is query the underlying DB using entity framework. When instantiating my DbContext using the connectionString Visual Studio generated, I get the following error:</p>
  
  <blockquote>
    <p>Unable to find the requested .Net Framework Data Provider. It may not be installed</p>
  </blockquote>
  
  <p>However, it is installed because </p>
  
  <ol>
  <li>I can see the dll in the GAC.</li>
  <li>It is mentioned in machine.config. </li>
  <li>It is referenced by my project.</li>
  <li>I actually use it to generate my EDMX from the database.</li>
  <li>I have verified that I am referencing the correct version (4.112.3.0) everywhere</li>
  </ol>
  
  <p>I am running the code locally on Cassini and my hardware is 32-Bit architecture, so I would assume I would only be able to use 32-Bit DLL's, so it's not an architecture problem.</p>
  
  <p>The specific bit of code is as such:</p>
  
  <pre><code>public class MyContext : ObjectContext, IUnitOfWork
  {
      public MyContext() 
      : base(ConfigurationManager
            .ConnectionStrings["OracleEntities"]
            .ConnectionString)//Connectionstring is verified
      {}
  }
  </code></pre>
  
  <p>please help me before I leave everything, grow a beard and go live in the mountains somewhere.</p>
  
  <p><strong>SOLUTION</strong>: Since I haven't seen any mention of the solution, I'll mention it here for future generations. Andrei below asked about my connection string format and although I was scheptical, I went and had a look. This is what I saw:</p>
  
  <pre><code>metadata=res://*/OracleModel.csdl|res://*/
  OracleModel.ssdl|res://*/
  OracleModel.msl;
  provider=provider=Oracle.DataAccess.Client;
  provider connection string=&amp;quot;DATA SOURCE=localhost:1521;
  PASSWORD=xxx;PERSIST SECURITY INFO=True;USER ID=xxx
  </code></pre>
  
  <p>Now, pay special attention to the line</p>
  
  <pre><code>provider=provider=Oracle.DataAccess.Client;
  </code></pre>
  
  <p>it <em>should</em>, in fact, read</p>
  
  <pre><code>provider=Oracle.DataAccess.Client;
  </code></pre>
  
  <p>otherwise you're telling EF to use [provider.dll], which isn't a real thing. Also note that it seems that the providerName property of the connectionString element seems to have been overridden or ignored.</p>
  
  <p><strong>UPDATE 2</strong>: If this STILL does not help, have a look at machine.config. You should see the following section:</p>
  
  <pre><code>&lt;add name="Oracle Data Provider for .NET" invariant="Oracle.DataAccess.Client" description="Oracle Data Provider for .NET" type="Oracle.DataAccess.Client.OracleClientFactory, Oracle.DataAccess, Version=4.112.3.0, Culture=neutral, PublicKeyToken=89b483f429c47342" /&gt;
  
    &lt;remove invariant="Oracle.DataAccess.Client" /&gt;
  
  &lt;/DbProviderFactories&gt;
  </code></pre>
  
  <p>If <strong>&lt;remove invariant="Oracle.DataAccess.Client" /&gt;</strong> is present, comment it out and try again, otherwise, if it's not there, put it in and try again.</p>