2011-01-20 20 views
0

このエラーは何が(私は私のプロジェクトをテストするときに来る).NET Frameworkデータプロバイダーエラー

--> 
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.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 

これはおそらく正しい構成情報を設定する必要が設​​定

<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> 

答えて

0

ですテストプロジェクトの.configファイル内の接続文字列(接続文字列)

編集:編集:私はいくつかの検索を行い、このフォーラムに出くわしましたスレッド:
見かけ受け入れ答えだった http://social.msdn.microsoft.com/Forums/en-US/sqlce/thread/ff731bf4-1f50-4f77-955b-e4534474a271/

私は手動で対SP1から SSCEVSTools-ENU.MSIをインストールすることで、私の問題を修正。

有用であるかもしれない他のいくつかのresults on Bingがありました。期待しています

+0

uが、それは完全に私は、Northwindサンプルデータベースがうまく働いた走ったが、今、このエラーに実行していた前 – mAs

+0

が、これらは私のweb.configコード – mAs

+0

ウル支援に感謝しますが、いくつかの時間です私を助けてくださいすることができます – mAs

0

Visual Studio 2010 SP1をインストールしたときに同じエラーが発生しましたが、それほど偉大ではないことが判明した後にロールバックされました(主な控えめな表現... VS2010 SP1から遠く離れています)。私はこのファイルを再インストールすることでこれを修正できることをオンラインで発見しました。そのソフトウェアの再インストール後、私はVS 2010を開始し、すべて正常に戻っていた。あなたのために働くことを願っています。ここで

が、私はそのパッケージを取得するために使用されるリンクである:あなたの説明から

http://download.microsoft.com/download/0/5/D/05DCCDB5-57E0-4314-A016-874F228A8FAD/SSCEVSTools-ENU.msi

0

、私は、接続文字列が無効であると仮定します。作業接続文字列を作成する1つの簡単な方法は以下の通りです:

  1. がそれに
  2. ダブルクリックし.UDLするために、そのファイルextenstionを変更
  3. デスクトップ上に新しい空のテキストファイルを作成します。接続ウィザードが開きます。
  4. 接続を構成します。次に、[テスト]をクリックします。接続が成功したら、ウィザードを閉じます。
  5. .udlファイルをテキストエディタで開きます。有効な接続文字列が含まれています。
  6. 接続文字列をテキストエディタからVisual Studioデータソース文字列にコピーします。私はそれを行うことができますどのよう
関連する問題