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

Setup doesn't work in v14 Core #87

Closed
jeffputz opened this issue Jul 6, 2018 · 2 comments
Closed

Setup doesn't work in v14 Core #87

jeffputz opened this issue Jul 6, 2018 · 2 comments
Labels

Comments

@jeffputz
Copy link
Collaborator

jeffputz commented Jul 6, 2018

There are database calls, even though the database has nothing in it yet, so it breaks. This is probably in large part due to the different ways that we do auth now, and it makes it impossible to use the PF ignore attribute on the actions that used to short circuit the auth pipeline in the old MVC version.

@TheYorkshireDev
Copy link

Is this the specific error you are referring too? When I run the latest on master (90bc8c3) I encounter this issue regardless of the page I am trying to access.

System.AggregateException
  HResult=0x80131500
  Message=One or more errors occurred.
  Source=System.Private.CoreLib
  StackTrace:
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at PopForums.Mvc.Areas.Forums.Authorization.PopForumsAuthorizationMiddleware.InvokeAsync(HttpContext context, IUserService userService, IProfileService profileService) in E:\Projects\POPForums\src\PopForums.Mvc\Areas\Forums\Authorization\PopForumsAuthorizationMiddleware.cs:line 20
   at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass4_1.<UseMiddleware>b__2(HttpContext context)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.<Invoke>d__6.MoveNext()

Inner Exception 1:
InvalidOperationException: No authentication handlers are registered. Did you forget to call AddAuthentication().Add[SomeAuthHandler]("PopForumsAuthScheme",...)?

Note: I have an empty popforums14 database.

@jeffputz
Copy link
Collaborator Author

That's the symptom, but it comes because startup items don't complete due to the lack of a PF tables in the database, so because they don't complete, the auth handler doesn't exist when it runs into it later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants