VS2010无法连接到SQlServer2008 Database file

在网上search了很久也没找到答案,今天终于找到解决方法了:

背景:

每次从SCM中checkin/out ASPNETDB.mdf, 在vs2010中都无法重新连接

解决方法:

1.为当前用户添加管理 ASPNETDB.mdf的权限

2.为当前用户添加启动MSSQL$SQLEXPRESS的权限,并重启此服务

3.在vs2010中添加connection,把user instance置为false

4.Test connection, sucessfully

原文地址:https://www.cnblogs.com/xixifusigao/p/1658074.html