Posts

Showing posts from August, 2017

Microsoft.EntityFrameworkCore.Database.Connection[200004]

Image
 Microsoft.EntityFrameworkCore.Database.Connection[200004]
      An error occurred using the connection to database 'DBAPIContext-4266f07e-a498-4ab6-9c86-792af5b78354' on server '(localdb)\mssqllocaldb'.
System.Data.SqlClient.SqlException (0x80131904): Cannot open database "DBAPIContext-4266f07e-a498-4ab6-9c86-792af5b78354" requested by the login. The login failed.
Login failed for user 'user.ID'.


---------------------------
Microsoft Visual Studio
---------------------------
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. 
Specified LocalDB instance name is invalid.

)
---------------------------
OK   

---------------------------



Solution: 

The following 2 steps solved issue for …

nuget configuration is invalid.

---------------------------
Microsoft Visual Studio
---------------------------
"Project" nuget configuration is invalid.

---------------------------
OK  
---------------------------

When you try to add the reference, via Manage Nuget Packages. You may get this above error message.

The solution is simple. Close the Visual Studio and open it again. This works most of the time.