Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply Migrations in EF Database error page does not work #4742

Closed
rustd opened this issue Mar 9, 2016 · 12 comments
Closed

Apply Migrations in EF Database error page does not work #4742

rustd opened this issue Mar 9, 2016 · 12 comments
Assignees
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-bug
Milestone

Comments

@rustd
Copy link

rustd commented Mar 9, 2016

  • Create an ASP.NET RC2 Web template
  • Register a user. you will get the database error page
  • Apply Migrations does not apply the migration but results in an error
    applymigrations
@rustd
Copy link
Author

rustd commented Mar 9, 2016

@rowanmiller FYI

@rowanmiller
Copy link
Contributor

Waiting on #4733 to be merged/built so that we can debug this one further.

@divega
Copy link
Contributor

divega commented Apr 7, 2016

My understanding is that this is also blocked on #4953. I will assign it to @natemcmaster while we wait for that one to be addressed.

@divega divega assigned natemcmaster and unassigned rowanmiller Apr 7, 2016
@natemcmaster
Copy link
Contributor

@rustd do you have a version of templates and a recent version of dotnet-cli that work together? I'm trying to reproduce with dotnet-cli 1.0.0-beta-002351

@rustd
Copy link
Author

rustd commented Apr 12, 2016

@phenning?

@phenning
Copy link

You should be able to repro with the latest bundle build.

@natemcmaster
Copy link
Contributor

The source of the bug is two fold.

  1. The error is triggered because there is no database. In the error above, there is no DB yet, which is why "login failed".
  2. The apply migration button executes a command that returns HTTP 404.

image

@natemcmaster
Copy link
Contributor

cc @JunTaoLuo @Tratcher are there known issues in diagnostics.entityframework? It appears UseDatabaseErrorPage() isn't working.

@Tratcher
Copy link
Member

There's nothing filed.

@natemcmaster
Copy link
Contributor

@Tratcher @rustd my guess is the bug here is in Diagnostics.EF, not EF itself. The request sent by the "Apply Migrations" button never reaches EF. The request gets lost in middleware.

@rustd
Copy link
Author

rustd commented Apr 13, 2016

@divega who owns Diagnostics.EF and who can fix this?

@divega
Copy link
Contributor

divega commented Apr 13, 2016

This is @rowanmiller's. Will ask @smitpatel to look at it if @rowanmiller cannot do it tomorrow.

@divega divega assigned smitpatel and unassigned natemcmaster Apr 13, 2016
@smitpatel smitpatel assigned rowanmiller and unassigned smitpatel Apr 15, 2016
rowanmiller added a commit to aspnet/Diagnostics that referenced this issue Apr 18, 2016
During all the changes to how options are handled etc. we ended up where
app.UseDatabaseErrorPage() would no longer register the migrations
middleware that allows the "Apply Migrations" button to work.

Resolves dotnet/efcore#4742
@ajcvickers ajcvickers added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Oct 15, 2022
@ajcvickers ajcvickers modified the milestones: 1.0.0-rc2, 1.0.0 Oct 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-bug
Projects
None yet
Development

No branches or pull requests

9 participants