.net framework data provider error
what is this error(comes up when i test my project)
-->
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) +1402071
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) +117
System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +21
System.Web.UI.WebControls.DataBoundControl.PerformSelect() +143
System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +74
System.Web.UI.WebControls.GridView.DataBind() +4
System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +66
System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +75
System.Web.UI开发者_StackOverflow社区.Control.EnsureChildControls() +102
System.Web.UI.Control.PreRenderRecursiveInternal() +42
System.Web.UI.Control.PreRenderRecursiveInternal() +175
System.Web.UI.Control.PreRenderRecursiveInternal() +175
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2496
This is the Configuration
<configuration>
<connectionStrings>
<add name="ConnectionString" connectionString="DataSource=C:\ProgramFiles\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\CIEDB.sdf;Password=sa;Persist Security Info=True"
providerName="Microsoft.SqlServerCe.Client.3.5" />
<add name="ConnectionString2" connectionString="Data Source=C:\Program Files\Microsoft SQL Server Compact Edition\v3.5\Samples\Northwind.sdf"
providerName="Microsoft.SqlServerCe.Client.3.5" />
</connectionStrings>
<system.web>
<compilation debug="true" targetFramework="4.0"/>
</system.web>
</configuration>
You probably have to set up the correct configuration information (connection strings) in the test project's .config file
Edit: with that config, I did some searching and came across this forum thread:
http://social.msdn.microsoft.com/Forums/en-US/sqlce/thread/ff731bf4-1f50-4f77-955b-e4534474a271/
Where the apparent accepted answer was:
I fix my issue by manually install SSCEVSTools-Enu.msi from Vs SP1.
There were a few other results on Bing that may be useful as well. Hope it helps
I had this same error when I installed Visual Studio 2010 SP1, then rolled back after I found out it was not so great (major understatement... stay far away from VS2010 SP1). I found online that I could fix this by reinstalling the and I got that file from here. After the reinstall of that software, i started VS 2010 and everything was back to normal. Hope it works for you.
Here is the link I used to get that package:
http://download.microsoft.com/download/0/5/D/05DCCDB5-57E0-4314-A016-874F228A8FAD/SSCEVSTools-ENU.msi
From your description, I assume the connection string is invalid. One easy way to create a working connection string is the following:
- Create a new, empty text file on the desktop
- Change its file extenstion to .udl
- Double click on it. This opens the connection wizard.
- Configure the connection. Then click on TEST. If the connection succeeds, close the wizard
- Open the .udl file in a text editor. It contains a valid connection string.
- Copy the connection string from the text editor into your Visual Studio data source string.
精彩评论