SqlException (0x80131904): Cannot open database "DBName" requested by the login

0

I have the following connection string in ASP.NET Core, but I get the following error:

Microsoft.Data.SqlClient.SqlException (0x80131904): Cannot open database "DBName" requested by the login. The login failed. Login failed for user 'admin-PC\admin'.

In SQL log

Error: 18456, Severity: 14, State: 38. and Login failed for user 'admin-PC\admin'. Reason: Failed to open the explicitly specified database 'DBName'. [CLIENT: ]

"AllowedHosts": "*",
  "ConnectionStrings": {
    "CoreConnection": "server=.;Database=DBName;Trusted_Connection=True;MultipleActiveResultSets=true;"

How can I make it work?

sql-server
asp.net-core
asked on Stack Overflow Feb 13, 2020 by Rob • edited Feb 13, 2020 by Dale K

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0