#

A database operation failed while processing the request. SqlException: Ungültiger Objektname AspNetUsers.

https://youtu.be/jLk3McHMtcg

 

Fehlermeldung in ASP .Net Core Anwendung .Net6 .Net 7 mit Authentifizierung Identity Framework

A database operation failed while processing the request.

SqlException: Ungültiger Objektname "AspNetUsers".


Applying existing migrations may resolve this issue


There are migrations that have not been applied to the following database(s):

ApplicationDbContext

  • 00000000000000_CreateIdentitySchema


In Visual Studio, you can use the Package Manager Console to apply pending migrations to the database:

PM> Update-Database
Alternatively, you can apply pending migrations from a command prompt at your project directory:

> dotnet ef database update

 

 

Lösung:
man muss in Visual Studio nur den Befehl Update-Database eingeben

Ein Bild, das Text, Monitor, Screenshot, Bildschirm enthält.
Automatisch generierte Beschreibung

 

 

In die existierende Datenbank werden AspNetUser Tabellen angefügt mit

User als GUID

Passwort verschlüsselt mit Hash

Ein Bild, das Text enthält.
Automatisch generierte Beschreibung

 

 

Tabelle AspNetUsers

SELECT TOP (1000) [Id]

      ,[UserName]

      ,[NormalizedUserName]

      ,[Email]

      ,[NormalizedEmail]

      ,[EmailConfirmed]

      ,[PasswordHash]

      ,[SecurityStamp]

      ,[ConcurrencyStamp]

      ,[PhoneNumber]

      ,[PhoneNumberConfirmed]

      ,[TwoFactorEnabled]

      ,[LockoutEnd]

      ,[LockoutEnabled]

      ,[AccessFailedCount]

  FROM [codedocu_de].[dbo].[AspNetUsers]

 

Mobile

.