【发布时间】:2020-05-12 17:00:01
【问题描述】:
我创建代码第一个应用程序,但我运行应用程序收到此错误,它不会生成 db
使用 sql server 2019 请帮我 我跑不了
Server Error in '/' Application.
The system cannot find the file specified
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ComponentModel.Win32Exception: The system cannot find the file specified
Source Error:
Line 71: // This doen't count login failures towards lockout only two factor authentication
Line 72: // To enable password failures to trigger lockout, change to shouldLockout: true
Line 73: var result = await SignInManager.PasswordSignInAsync(model.Email, model.Password, model.RememberMe, shouldLockout: false);
Line 74: switch (result)
Line 75: {
Source File: G:\MvcProject\OPA finally\OPA finally\Controllers\AccountController.cs Line: 73
Stack Trace:
[Win32Exception (0x80004005): The system cannot find the file specified]
[SqlException (0x80131904): 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.)]
System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword,
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4075.0
我的连接字符串是真的,但我没有工作 web.config 连接字符串代码:
<connectionStrings>
<add name="DefaultConnection" connectionString="Data Source=.;Initial Catalog=DefaultConnection;Integrated Security=True;" providerName="System.Data.SqlClient" />
</connectionStrings>
谢谢你的回答
【问题讨论】:
标签: asp.net asp.net-mvc entity-framework