データベーススキーマのコピーを作成しようとしていますが、テスト目的でアプリケーションで一時的に使用していますライブデータを変更しないでください。私が作って試してみましたEFのローカルDBコピーの使用 - 「指定された名前付き接続がコンフィグレーションに見つかりません」
An exception of type 'System.ArgumentException' occurred in System.Data.Entity.dll but was not handled in user code
Additional information: The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid.
私の接続文字列は次のようになります:しかし、関係なく、私は何をすべきか、それは常に私にこのエラーを与えていない私はMDFファイルで試してみた
<add name="EntitiesConnectionString" connectionString="Data Source=(LocalDB)\v11.0;AttachDbFilename=|DataDirectory|\vipertest.mdf;Integrated Security=True" providerName="System.Data.SqlClient" />
<add name="EntitiesConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\vipertest.mdf;Integrated Security=SSPI;User Instance=True" providerName="System.Data.SqlClient"/>
、なし。
私はこれをWeb.Configとapp.configの両方で行っていますが、私はいつも同じエラーが発生します。
接続文字列は、実際にはEntity Framework接続文字列のようには見えません。説明するのに役立つ回答を投稿しました。 –