question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issue with .net core 2.0 upgrade.

See original GitHub issue

Hi @PinpointTownes I am trying to upgrade my project to .net core 2.0. Branch name is netcore2.

Managed to login using credentials and token model is returned from server, including refresh_token. But when request is sent using refresh token (e.g by doing full page reload), getting following error:

{"message":"No authentication handler is configured to authenticate for the scheme: ASOS","isError":true,"detail":" at Microsoft.AspNetCore.Http.Authentication.Internal.DefaultAuthenticationManager.<GetAuthenticateInfoAsync>d__12.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter1.GetResult()\r\n at AspNetCoreSpa.Server.Controllers.api.AuthorizationController.<Exchange>d__4.MoveNext() in c:\Users\asahi\AspNetCoreSpa\Server\Controllers\api\AuthorizationController.cs:line 115\r\n— End of stack trace from previous location where exception was thrown —\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeActionMethodAsync>d__12.MoveNext()\r\n— End of stack trace from previous location where exception was thrown —\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeNextActionFilterAsync>d__10.MoveNext()\r\n— End of stack trace from previous location where exception was thrown —\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context)\r\n at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeInnerFilterAsync>d__14.MoveNext()\r\n— End of stack trace from previous location where exception was thrown —\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<InvokeNextExceptionFilterAsync>d__23.MoveNext()",“errors”:null}`

Here is the line where I have registered in service collection.

Anything obvious missing?

Thanks

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:33 (14 by maintainers)

github_iconTop GitHub Comments

3reactions
kevinchaletcommented, Aug 17, 2017

@JanEggers enable logging and take a look at your logs?

FYI, I ported all the OpenIddict samples to 2.0 last night, including the ROPC and refresh flow samples: https://github.com/openiddict/openiddict-samples

1reaction
adnan-kamilicommented, Aug 23, 2017

To get it working I had to explicitly set:

services.AddAuthentication(options => {
                options.DefaultScheme = JwtBearerDefaults.AuthenticationScheme;
                options.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme;
                options.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme;
            })
Read more comments on GitHub >

github_iconTop Results From Across the Web

Migrate from ASP.NET Core 2.0 to 2.1
This article covers the basics of migrating an ASP.NET Core 2.0 app to 2.1.
Read more >
ASP.NET Core 2.0 Upgrade - Broken NETStandardLibrary ...
The older .NET Framework project system doesn't properly support .NET Standard Library 2.x, at least at design time. It requires the new ....
Read more >
Migrate from ASP.NET Core 1.x to 2.0
In this article, we walk you through updating an existing ASP.NET Core 1.x project to ASP.NET Core 2.0. Migrating your application to ASP....
Read more >
The new ASP.NET Core 2.0 packages can no longer be ...
NET Framework support for ASP.NET Core 2.0" plan has been officially cancelled and running ASP.NET Core 2.0 on .NET Desktop will be supported...
Read more >
Mission Impossible: Migrating .NET Core 1.x to 2.0
I had a lot of problems upgrading .NET Core 1.x apps to .NET Core 2.0; I yet have to feel the promise it...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found