freiberuflicher Software Entwickler C#, vb.Net, vba, UWP, WPF, WinForms, SQL Server, Access, Excel, ASP.Net Core MVC Telefon: 07022/9319004   Kontakt
#

 

 

Beim ersten Aufruf einer Asp.Net MVC Core 2 Anwendung mit Authentication tritt der Feher auf:

A database operation failed while processing the request.

 

URL: https://localhost:44328/Account/Register

 

 

Lösung:

Packet Manager Console öffnen und Update-Database eintippen

 

Komplette Fehlermeldung

A database operation failed while processing the request.


SqlException: Cannot open database "aspnet-Auth01b-D7FBAB0F-A682-4F66-924E-A3CE4E1F6A0B" requested by the login. The login failed. Login failed for user 'DESKTOP-F634M99\Raimund'. 

Applying existing migrations for ApplicationDbContext may resolve this issue


There are migrations for ApplicationDbContext that have not been applied to the database
  • 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

 

 

Betrifft: Asp.Net MVC Core 2 EF

 

Mobile
»
ASP.Net: A database operation failed while processing the request.
»
API Fehler: Could not get any response wegen Null
»
ASP EF Error: Unable to create an object of type DbContext
»
Asp.net Fehler: No DbContext was found in assembly
»
Asp.net Fehler: The entity type xxx requires a primary key to be defined.

.

Jobs, Projekte, Angebote für Freiberufler, Selbstständig an Raimund.Popp@Microsoft-Programmierer.de