从App Data创建sql数据库时出现网络连接错误



我正在开发一个MVC 5应用程序。在我的MVC 5应用程序中,我想从App Data文件夹创建一个mdf文件,但当我想从add_Data文件夹的add New Item菜单添加mdf文件时,我收到一个错误

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 50 – Local Database Runtime error occurred. Cannot create an automatic instance. See the Windows Application event log for error details

尝试运行

SqlLocalDB delete “v11.0”

然后是

SqlLocalDB create “v11.0”

SqlLocalDB.exe位于C:Program FilesMicrosoft SQL Server110ToolsBinn中。

最新更新