【发布时间】:2016-11-12 11:56:32
【问题描述】:
我正在 ASP.NET MVC5 中创建一个 Web 应用程序。当我创建项目时,自动添加了一个名为 AccountController 的控制器,其中包含所有必要的功能。现在,当我运行应用程序并注册新用户或尝试登录时,它会出现一些错误。当我运行它时,它应该在 App_data 中创建一个数据库,但它没有创建任何数据库并给出以下错误。谁能帮我解决一下
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: 52 - Unable to locate a Local Database Runtime installation. Verify that SQL Server Express is properly installed and that the Local Database Runtime feature is enabled.)]
连接字符串是:
<add name="DefaultConnection" connectionString="Data Source=(LocalDb)\v11.0;AttachDbFilename=|DataDirectory|\aspnet-EmployeeOrderSystem-20160710042802.mdf;Initial Catalog=aspnet-EmployeeOrderSystem-20160710042802;Integrated Security=True" providerName="System.Data.SqlClient" />
如果需要任何其他细节,请询问。提前致谢
【问题讨论】:
标签: asp.net sql-server asp.net-mvc entity-framework asp.net-mvc-5