Unable to find the requested .Net Framework Data Provider. It may not be installed. [Answered]RSS

1 reply

Last post Feb 11, 2016 09:22 PM by Jean Sun

  • Unable to find the requested .Net Framework Data Provider. It may not be installed.

    Feb 10, 2016 09:28 PM|Brian Ashcraft|LINK

    Hello All,

    I am using WebMatrix with a MySQL database.  ASP.Net, with Razor syntax.

    My hosting is with goDaddy.

    I have successfully deployed my database to goDaddy, and am able to connect to it using mySQL Workbench.

    I believe I have a problem with either my web.config file, or perhaps a mySQL dll.

    I FTP'd my site to goDaddy, and placed the following DLLs int he /bin directory:

    MySqlData.dll, MySql.Data.Entity.dll, MySqlWeb.dll and System.Data.Entity.dll

    My web.config file looks like this:

    <?xml version="1.0" encoding="utf-8"?>
     
    <configuration>
      <system.webServer>
      </system.webServer>
      <system.web>
        <compilation debug="true" targetFramework="4.0" />
        <customErrors mode="Off" />
      </system.web>
      <system.data>
        <DbProviderFactories>
        </DbProviderFactories>
      </system.data>
      <connectionStrings>
            <add name="RP" connectionString="Server=50.62.209.107;Database=RP;Uid=my_userid;Pwd=my_password" providerName="MySql.Data.MySqlClient"></add>
      </connectionStrings>
      <appSettings>
            <add key="enableSimpleMembership" value="true" />
     </appSettings>
    </configuration>

    When I execute the website in my browser I get the following error:

     Unable to find the requested .Net Framework Data Provider.  It may not be installed.

    Line 29: 
    Line 30: @{
    Line 31:     WebSecurity.InitializeDatabaseConnection("RP", "UserProfile", "UserId", "Email", true);
    Line 32: }
    


    Source File: g:\pleskvhosts\dibbstraining.com\robeyspub.com\_AppStart.cshtml    Line: 31 

    The website works fine, if I change the connection to "localhost", and leave all other information the same.

    When I hit the Remote/Settings button in WebMatrix I get the following error:

    "error trying to discover the databases from 'Web.config'  An error occurred when reading the IIS Configuration File."

    When I hit the Remote/Check Compatibility button the process starts, and it just churns.  It never seems to finish.

    I can "Publish" my website using "Web Deploy".

    Any help appreciated.  Day 3 of facerolling the keyboard....  

    Thanks!

  • Re: Unable to find the requested .Net Framework Data Provider. It may not be installed.

    Feb 11, 2016 09:22 PM|Jean Sun|LINK

    Hi Brian,

    Please try adding the following code into your web.config file.

      <system.data>
        <DbProviderFactories >
          <add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.6.5.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
        </DbProviderFactories>
      </system.data>

    Note: you need to add change the version in the code to the version you are using.

    Best Regards,
    Jean

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue.
    If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.