jame581 / Timinute

The application serves as a demonstration of the possibilities of the new Blazor technology. Allows you to track time and task. Identity server is used to manage users.
MIT License
8 stars 1 forks source link

login issue #22

Open AERONAUT-AUT opened 1 month ago

AERONAUT-AUT commented 1 month ago

Hi,

I´m new to docker but started with Blazor few weeks ago. I´m facing an issue during the login cycle with following message: SqlException: The INSERT statement conflicted with the FOREIGN KEY constraint "FK_AspNetUserRoles_AspNetUsers_UserId". The conflict occurred in database "Timinute", table "dbo.AspNetUsers", column 'Id'. The statement has been terminated. image

i tried to do the manual database migration and update, but unfortunatley without success.

Do you have any idea, whats the root cause for this message? Is it possible to see the database inside the "timinute.sql.server" docker container?

jame581 commented 1 month ago

Hi, I set up the project from scratch and didn’t have this issue. Did you run both setup scripts for Docker and the database? First, run SetupDockerSql.ps1, then MigrateDatabase.ps1. It looks like you forgot to migrate the database.

I logged in on both the master and develop branches and didn’t find any issues.