Sql server 尝试与在我的电脑上运行的SQL Server 2012(localdb)建立MVC连接时出错

Sql server 尝试与在我的电脑上运行的SQL Server 2012(localdb)建立MVC连接时出错,sql-server,asp.net-mvc,Sql Server,Asp.net Mvc,我的web.config设置如下: <add name="DefaultConnection" connectionString="Data Source='C:\Users\Marilou\AppData\Local\Microsoft\Microsoft SQL Server Local DB\Instances\v11.0\authentication.mdf';Initial Catalog=javacert;Persist Security Info=True;User ID=s

我的web.config设置如下:

<add name="DefaultConnection" connectionString="Data Source='C:\Users\Marilou\AppData\Local\Microsoft\Microsoft SQL Server Local DB\Instances\v11.0\authentication.mdf';Initial Catalog=javacert;Persist Security Info=True;User ID=sa;Password=yyy" providerName="System.Data.SqlClient" />

看起来您正在使用LocalDB。从这篇MSDN文章()中,连接字符串如下所示:

Data Source=(localdb)\v11.0;Integrated Security=true;AttachDbFileName=C:\MyData\Database1.mdf".

SQL Server版本?老实说,当我有疑问的时候,我只是检查一下链接,但是我找不到更多关于如何连接到新的(localdb)的信息。谢谢,我现在就要尝试一下。
Data Source=(localdb)\v11.0;Integrated Security=true;AttachDbFileName=C:\MyData\Database1.mdf".