I have and ASP.NET MVC website working fine with my SQL 2016. I mean there is no problem with ConnectionString
in the web.config
file!
But the problem is where I add-migration
and wanna to Update-Database
via Package Manager Console.
I get this error:
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: 26 - Error Locating Server/Instance Specified)
What can cause? the connection string is 100% correct! the SQL server is working with live app!
why couldn't EF connect to that?
.NET Framework version: 4.7.2 SQL Server version : 2016 OS: Windows 10