title: ASP.Net MVC with MySql - unable to find the requested .Net Framework Data Provider
body: <p>I have installed the MySql Connector 6.6.5 from <a href="http://dev.mysql.com/downloads/connector/net/" rel="nofollow noreferrer">http://dev.mysql.com/downloads/connector/net/</a></p>
  
  <p>I have added it as a reference in my asp.net MVC website (please see screenshots below), and changed "Copy local" to true.</p>
  
  <p>However, when I get to the line:<code>var calls = db.Calls.ToList();</code> I get the error:</p>
  
  <p><code>Unable to find the requested .Net Framework Data Provider.  It may not be installed.</code></p>
  
  <p>I've included my code below.  Can anyone please let me know what I'm missing?</p>
  
  <p>Thanks, Mark</p>
  
  <p><strong>Controller Call.cs:</strong></p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Web;
  using System.Web.Mvc;
  using MySql.Data;
  using MySql.Data.Entity;
  using MySql.Data.MySqlClient;
  using MySql.Web;
  using System.Data;
  
  namespace bm.Controllers
  {
  public class CallController : Controller
  {
      private CallContext db = new CallContext();
  
      //
      // GET: /Calls/
      public ActionResult Index()
      {
          var calls = db.Calls.ToList();
          return View(calls);
      }
    }
  }
  </code></pre>
  
  <p><strong>CallContext.cs</strong></p>
  
  <pre><code>using bm.Models;
  using System.Data.Entity;
  public class CallContext : DbContext
  {
      static CallContext()
      {
  
      }
      public CallContext()
          : base("callsConn")
      {
  
      }
  
      public DbSet&lt;Call&gt; Calls { get; set; }
  }
  </code></pre>
  
  <p><strong>Web.Config Connection String:</strong></p>
  
  <pre><code> &lt;connectionStrings&gt;
    &lt;add name="callsConn" connectionString="Server=xxx;Port=3306;Database=xxxx;Uid=root;Pwd=;" providerName="MySql.Data.MySqlClient" /&gt;
   &lt;/connectionStrings&gt;
  </code></pre>
  
  <p><strong>References:</strong></p>
  
  <p><img src="https://i.stack.imgur.com/nmM6M.png" alt="References"></p>