Failed to find or load the registered .Net Framework Data Provider.

Discussion in 'Databases' started by Haroon, Mar 26, 2011.

  1. Hi, I need help with sections of my web config ;

    I am getting the following error

    "Failed to find or load the registered .Net Framework Data Provider.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Configuration.ConfigurationErrorsException: Failed to find or load the registered .Net Framework Data Provider. "

    Stack Trace:

    [ConfigurationErrorsException: Failed to find or load the registered .Net Framework Data Provider.]
    System.Data.Common.DbProviderFactories.GetFactory(DataRow providerRow) +1401682
    System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName) +88
    WebMatrix.Data.DbProviderFactoryWrapper.CreateConnection(String connectionString) +64
    WebMatrix.Data.<>c__DisplayClass15.<OpenConnectionStringInternal>b__14() +16
    WebMatrix.Data.Database.get_Connection() +19
    WebMatrix.Data.Database.EnsureConnectionOpen() +13
    WebMatrix.Data.<QueryInternal>d__0.MoveNext() +72
    System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) +327
    System.Linq.Enumerable.ToList(IEnumerable`1 source) +58
    WebMatrix.Data.Database.Query(String commandText, Object[] parameters) +98
    ASP._Page_EventData_cshtml.Execute() +357
    System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +209
    System.Web.WebPages.WebPage.ExecutePageHierarchy(IEnumerable`1 executors) +68
    System.Web.WebPages.WebPage.ExecutePageHierarchy() +123
    System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +78
    System.Web.WebPages.WebPageHttpHandler.ProcessRequestInternal(HttpContext context) +226

    Here are a couple of sections from my web config file>
    <remove invariant="System.Data.SqlServerCe.4.0" />
    <add invariant="System.Data.SqlServerCe.4.0" name="Microsoft® SQL Server® Compact 4.0" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=, Culture=neutral, PublicKeyToken=??????" />

    <add name="db_connection" connectionString="Data;Initial Catalog=DB_?????_File;User ID=DB_?????_user;Password='*******' ;Integrated Security=False;" />

    Can anyone help point out the error please
    Last edited by a moderator: Oct 14, 2015
  2. Resolved

    Just an update,

    I resolved the issue, had 6 more, but all now working, and website working with Database content.

  3. Ray


    What was the solution. We would like to know for others to also learn from. Base from the thread it sounds like you do not have the proper .Net framework picked for your site.
  4. Solution

    Had the wrong provider information, corrected in web.config as below;

    <add name="SqlClient Data Provider" invariant="System.Data.SqlClient" description=".Net Framework Data Provider for SqlServer" type="System.Data.SqlClient.SqlClientFactory, System.Data, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089" />

    <add connectionString="Uid=DB_NNNNN_eventlist_user;Server=s??;Database=DB_NNNNN_eventlist;Pwd=********" name="db_MyDB" providerName="System.Data.SqlClient" />
    Last edited by a moderator: Oct 14, 2015

Share This Page