A database operation failed while processing the request. SqlException: Ungültiger Objektname AspNetUsers.
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 issueThere are migrations that have not been applied to the following database(s): ApplicationDbContext
In Visual Studio, you can use the Package Manager Console to apply pending migrations to the database:
Alternatively, you can apply pending migrations from a command prompt at your project directory:
|
Lösung:
man muss in Visual Studio nur den Befehl Update-Database eingeben
In die existierende Datenbank werden AspNetUser Tabellen angefügt mit
User als GUID
Passwort verschlüsselt mit Hash
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] |