ASP.NET Core React template - Can't find client id

5

I have created a ASP.NET Core 3.0 application using the React template configured with individual accounts login.

I have since then upgraded it to version 3.1 and everything compiles and builds.

However, at runtime I get the following error in the default controller namely OidcConfigurationController:

System.InvalidOperationException
  HResult=0x80131509
  Message=Client 'MyApp' not found.
  Source=Microsoft.AspNetCore.ApiAuthorization.IdentityServer
  StackTrace:
   at Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ClientCollection.get_Item(String key)
   at Microsoft.AspNetCore.ApiAuthorization.IdentityServer.DefaultClientRequestParametersProvider.GetClientParameters(HttpContext context, String clientId)
   at MyApp.Web.Controllers.OidcConfigurationController.GetClientRequestParameters(String clientId) in C:\Users\Baha\source\repos\MyApp\src\Web\Controllers\OidcConfigurationController.cs:line 22
   at Microsoft.Extensions.Internal.ObjectMethodExecutor.Execute(Object target, Object[] parameters)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync()
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync()

The clientId parameter in the controller originates from the React files, specifically ApiAuthorizationConstants.js as the variable ApplicationName.

I'm a bit lost on this, however creating a new project using the React template with 3.1 runs fine.

Has anyone experienced this or some hints where to go from here?

c#
reactjs
asp.net-core
asked on Stack Overflow Dec 10, 2019 by brk

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0