Thought I would try this quick tutorial.
I built the project and tried it out
The web app came up fine
When I tried to hit the database it failed, using the following connection string, created by the application.
"RazorPagesMovieContext": "Server=(localdb)\\mssqllocaldb;Database=RazorPagesMovieContext-cdc6b0d0-adde-4a63-a778-1ea057d82af4;Trusted_Connection=True;MultipleActiveResultSets=true"
SqlException: Cannot open database "RazorPagesMovieContext-cdc6b0d0-adde-4a63-a778-1ea057d82af4" requested by the login. The login failed.
Login failed for user 'MrServer\MrMe'.
Microsoft.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, bool breakConnection, Action<Action> wrapCloseInAction)
I even tried connecting using sa account (which is active), and running under administrator account.
I can login to SQLExpress using sa or MrServer\MrMe just fine through SSMS.
C:\Windows\System32\aspnetcoreapp>sqllocaldb info mssqllocaldb
Name: mssqllocaldb
Version: 14.0.2037.2
Shared name:
Owner: MrServer\MrMe
Auto-create: Yes
State: Running
Last start time: 4/8/2021 11:19:27 AM
Instance pipe name: np:\.\pipe\LOCALDB#80FA37E1\tsql\query
I have verified named pipes for SQL are setup
I'm using
Microsoft Visual Studio Community 2019
Version 16.9.3.
with .NET SDK 5.x
Windows 10
I have also tried it using Visual Studio Enterprise and it still fails.
The author was asked about this and the answer was, "it worked when he did it".
I'm thinking something typical may have changed with all of the updates to VS, SQL, Windows 10 causing this issue.
Any ideas on where to look next?
Thank you