none
Unable to find the requested .Net Framework Data Provider. It may not be installed. -- VS 2010 RRS feed

  • Question

  • In a MVC Web application I wanted to create a database in VS 2010 using the .net 4.0 framework. However, I get the above error when I try to create the database in Server Explorer. I also get an similiar error when I try to create a database in the Solution Explorer, under the App_Data node.
    I currently have SQL Server 2008 and SQL Server 2005. My machine.config file has nothing in the dbproviders..??:

    This is under the 4.0 framework folder
      <connectionStrings>
            <add name="LocalSqlServer" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient"/>
        </connectionStrings>

        <system.data>
           
            <DbProviderFactories />
        </system.data>

    However, under the 2.0 framework folder the Machine.Config file has:

      <connectionStrings>
            <add name="LocalSqlServer" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient"/>
        </connectionStrings>

        <system.data>
            <DbProviderFactories>
               <add name="Odbc Data Provider"         invariant="System.Data.Odbc"         description=".Net Framework Data Provider for Odbc"      type="System.Data.Odbc.OdbcFactory, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
               <add name="OleDb Data Provider"        invariant="System.Data.OleDb"        description=".Net Framework Data Provider for OleDb"     type="System.Data.OleDb.OleDbFactory, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
               <add name="OracleClient Data Provider" invariant="System.Data.OracleClient" description=".Net Framework Data Provider for Oracle"    type="System.Data.OracleClient.OracleClientFactory, System.Data.OracleClient, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
               <add name="SqlClient Data Provider"    invariant="System.Data.SqlClient"    description=".Net Framework Data Provider for SqlServer" type="System.Data.SqlClient.SqlClientFactory, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
            </DbProviderFactories>
        </system.data>

    Any suggestive fixes? Could there be a problem with my installs? Does anyone know of element I could add to one of these files to fix this? (I'm not sure what it should look like for 4.0)  Or is there another underlying issue?


    .NET noob
    Friday, December 9, 2011 4:16 PM

Answers

  • I checked my assembly like the link directed but it looks like none of the assemblies in my web.config file are in the assembly, how would I go about fixing this?

    I'd like to try to add the dbProviderFactory to my machine.config under 4.0 to see if that works, but I'm not sure how it should be formed...
    .NET noob


    Hi Speigel,

    Starting with .NET Framework 4.0 ,the .NET Framework providers such as System.Data.SqlClient and System.Data.OracleClient are no longer listed in the machine.config file . DbProviderFactories.GetFactoryClasses() will determine the framework providers dynamically at runtime.

    Please refer to Obtaining a DbProviderFactory (ADO.NET) for more details.


    Best Regards,
    Peja

    Please remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as Answer" if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    • Edited by Peja Tao Monday, December 12, 2011 8:36 AM
    • Marked as answer by Peja Tao Friday, December 16, 2011 1:14 AM
    Monday, December 12, 2011 8:36 AM

All replies

  • Pls check this might help you http://www.myviewstate.net/blog/post/2009/05/24/e2809cUnable-to-find-the-requested-Net-Framework-Data-Provider-It-may-not-be-installede2809d.aspx

    http://uk.linkedin.com/in/ramjaddu
    Friday, December 9, 2011 4:51 PM
  • I checked my assembly like the link directed but it looks like none of the assemblies in my web.config file are in the assembly, how would I go about fixing this?

    I'd like to try to add the dbProviderFactory to my machine.config under 4.0 to see if that works, but I'm not sure how it should be formed...
    .NET noob
    Friday, December 9, 2011 5:46 PM
  • I checked my assembly like the link directed but it looks like none of the assemblies in my web.config file are in the assembly, how would I go about fixing this?

    I'd like to try to add the dbProviderFactory to my machine.config under 4.0 to see if that works, but I'm not sure how it should be formed...
    .NET noob


    Hi Speigel,

    Starting with .NET Framework 4.0 ,the .NET Framework providers such as System.Data.SqlClient and System.Data.OracleClient are no longer listed in the machine.config file . DbProviderFactories.GetFactoryClasses() will determine the framework providers dynamically at runtime.

    Please refer to Obtaining a DbProviderFactory (ADO.NET) for more details.


    Best Regards,
    Peja

    Please remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as Answer" if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    • Edited by Peja Tao Monday, December 12, 2011 8:36 AM
    • Marked as answer by Peja Tao Friday, December 16, 2011 1:14 AM
    Monday, December 12, 2011 8:36 AM