Error messages that encountered errors related to the network -related or instance specific error when connecting to SQL Server encountered a network -related or instance -specific error when connecting to SQL Server ", especially when using a local database. This error may occur when trying to access the database from the ASP.NET MVC 5 application.
]Error reason:
error "SQL network interface, error: 50 -error when local database runtime. Unable to create an automatic instance" appeared when the application cannot establish a connection with the LOCALDB instance. LOCALDB is a lightweight database server running on a local computer.
solution:
The recommendation method to solve this problem is to modify the connection string in the web.config file to use the correct server name of the LocalDB instance:
Other precautions:
Verify whether the SQL Server is configured to allow remote connections. Make sure that the MyDataBase instance does not disconnect the connection after the application starts. Refresh the database in the server resource manager may allow you to view the table.
Disclaimer: All resources provided are partly from the Internet. If there is any infringement of your copyright or other rights and interests, please explain the detailed reasons and provide proof of copyright or rights and interests and then send it to the email: [email protected] We will handle it for you as soon as possible.
Copyright© 2022 湘ICP备2022001581号-3