The problem is with your connection string. Verify that you have a valid Data Source and that you have permission to access it. Check the Integrated Security token and your Data Source token.
This doesn't work for SQL Express 10.0.2531 in VS 2010
<add name="mymodelDBContext" connectionString="Data Source=(LocalDB);AttachDbFilename=|DataDirectory|\mynewdb.mdf;Integrated Security=True" providerName="System.Data.SqlClient"/>
But this does:
<add name="mymodelDBContext" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\mynewdb.mdf;Integrated Security=True" providerName="System.Data.SqlClient"/>
Share This To :
0 comments:
Post a Comment