Cannot open database requested by the login – “Error Number:4060,State:1,Class:11”
I have an ASP.NET app, and when I launch the app and try to list items from a table by accessing the corresponding route, I get this error:
SqlException: Cannot open database “appointments” requested by the login. The login failed. Login failed for user ‘DESKTOP-KRBN07Gjuan_’.
The database exists, and so do all the tables. I can connect to the database from SSMS and the ‘Server Explorer’ view in Visual Studio. I am using the connection string provided by the Server Explorer in Visual Studio. I also did a clean installation of Windows, Visual Studio, SQL Server, and SSMS. Currently, I have only one DB server and one database.
The error:
My VS and connection string:
Please help me; this error is driving me mad. If you need any extra info, please let me know.
I have an ASP.NET app, and when I launch the app and try to list items from a table by accessing the corresponding route, I get this error: SqlException: Cannot open database “appointments” requested by the login. The login failed. Login failed for user ‘DESKTOP-KRBN07Gjuan_’. The database exists, and so do all the tables. I can connect to the database from SSMS and the ‘Server Explorer’ view in Visual Studio. I am using the connection string provided by the Server Explorer in Visual Studio. I also did a clean installation of Windows, Visual Studio, SQL Server, and SSMS. Currently, I have only one DB server and one database.The error: My VS and connection string: Please help me; this error is driving me mad. If you need any extra info, please let me know. Read More