none
Unable to find the requested .Net Framework Data Provider.

    Question

  • I am attempting to attach to a local database using SqlServer Compact Edition 3.5sp1 while creating a website using VS 2008 Sp1.
    I have looked at a lot of the posts out here and have attempted to reinstall the entire development environment. I uninstalled vs2008 and all sqlserver components. I installed VS2008 professional first then downloaded the VS2008 sp1. My config now shows VS2008 sp1 and sqlserver compact edition runtime and tools 3.5sp1. I am still getting this error. Can anyone point me in the right direction. I know that I should use a different db manager to deploy the app, but right now I am doing some fast training. Any help would be greatly appreciated. Thanks
    Friday, February 20, 2009 1:08 AM

Answers

  • Hi,

    NOTE: SQL Compact is not supported for ASP.Net scenarios. You can use SQL Compact under ASP.net scenarios by setting the following propert to true: "SQLServerCompactEditionUnderWebHosting"

    AppDomain.CurrentDomain.SetData("SQLServerCompactEditionUnderWebHosting", true);

    Caution: SQL Compact team does not support this scenario.

    Can you elaborate about the error? Who throws the error and the exact Exception, Callstack and Message.

    Thanks & Regards,
    Devesh Anand









    Please click Yes, if my post was helpful.
    • Marked as answer by VBJetGuy Monday, February 23, 2009 1:04 PM
    Friday, February 20, 2009 4:47 AM

All replies

  • Hi,

    NOTE: SQL Compact is not supported for ASP.Net scenarios. You can use SQL Compact under ASP.net scenarios by setting the following propert to true: "SQLServerCompactEditionUnderWebHosting"

    AppDomain.CurrentDomain.SetData("SQLServerCompactEditionUnderWebHosting", true);

    Caution: SQL Compact team does not support this scenario.

    Can you elaborate about the error? Who throws the error and the exact Exception, Callstack and Message.

    Thanks & Regards,
    Devesh Anand









    Please click Yes, if my post was helpful.
    • Marked as answer by VBJetGuy Monday, February 23, 2009 1:04 PM
    Friday, February 20, 2009 4:47 AM
  • Hi Devesh,


    Thanks for the reply, I appreciate your assistance. Where which module would I place that code?
    If SqlServer Compact edition is not supported, I guess I will install SqlServer 2008 Express edition to continue on with my testing, however, if I can get it to attach to Sql CE I could experiment more quickly because I already have a DB that is configured and populated.  Again thanks for the help.

    Here is the error summary that I get when I attempt to execute the original code:

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

    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.ArgumentException: Unable to find the requested .Net Framework Data Provider.  It may not be installed.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:

    [ArgumentException: Unable to find the requested .Net Framework Data Provider.  It may not be installed.]
    System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName) +1310319
    System.Web.UI.WebControls.SqlDataSource.GetDbProviderFactory() +67
    System.Web.UI.WebControls.SqlDataSource.GetDbProviderFactorySecure() +22
    System.Web.UI.WebControls.SqlDataSource.CreateConnection(String connectionString) +11
    System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +89
    System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +19
    System.Web.UI.WebControls.DataBoundControl.PerformSelect() +142
    System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +73
    System.Web.UI.WebControls.GridView.DataBind() +4
    System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
    System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +72
    System.Web.UI.Control.EnsureChildControls() +87
    System.Web.UI.Control.PreRenderRecursiveInternal() +44
    System.Web.UI.Control.PreRenderRecursiveInternal() +171
    System.Web.UI.Control.PreRenderRecursiveInternal() +171
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842


    Version Information: Microsoft .NET Framework Version:2.0.50727.3074; ASP.NET Version:2.0.50727.3074



    Friday, February 20, 2009 1:02 PM