I'm attempting to create a copy of a database schema, and then use it in the application temporarily for testing purposes so I don't alter live data. However, no matter what I do, it always gives me this error:
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.
I have tried making my connection strings look like the following:
<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"/>
I've tried with an mdf file, and without.
I've done this in both Web.Config and app.config, but I always get the same error.