Open Closed

"Could not find IdentityClientConfiguration for AbpMvcClient".Why? #2633


User avatar
0
yujunlee created

Could not find IdentityClientConfiguration for AbpMvcClient. Either define a configuration for AbpMvcClient or set a default configuration.Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples, to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, please use the search on the homepage.

If you're creating a bug/problem report, please include followings:

  • ABP Framework version: v5.1.3
  • UI type: MVC
  • DB provider: EF Core
  • **Tiered (MVC) : yes
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

An error message appears when running after publishing, where do I need to configure it? `` Could not find IdentityClientConfiguration for AbpMvcClient. Either define a configuration for AbpMvcClient or set a default configuration.


3 Answer(s)
  • User Avatar
    0
    gterdem created
    Support Team Senior .NET Developer

    It is a warning log from IdentityServerIAuthenticationService when trying to get access token while identityserver client configuration could not be found in appsettings or null.

    Your application may be trying to authenticate default (null) identity client that can cause this warning then setting the new access token as Bearer to authentication header.

    It shouldn't effect your application.

  • User Avatar
    0
    yujunlee created

    However, the Web.Public login cannot be jumped. After changing to a non-layered solution, the following error message still appears:

    2022-02-23 17:02:31.229 +08:00 [INF] Error from RemoteAuthentication: OpenIdConnectAuthenticationHandler: message.State is null or empty.. 2022-02-23 17:02:31.233 +08:00 [ERR] An unhandled exception has occurred while executing the request. System.Exception: An error was encountered while handling the remote login. ---> System.Exception: OpenIdConnectAuthenticationHandler: message.State is null or empty. --- End of inner exception stack trace --- at Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler1.HandleRequestAsync() at IdentityServer4.Hosting.FederatedSignOut.AuthenticationRequestHandlerWrapper.HandleRequestAsync() at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.<Invoke>g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task) 2022-02-23 17:02:31.260 +08:00 [INF] Executing endpoint 'Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Controllers.ErrorController.Index (Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared)' 2022-02-23 17:02:31.263 +08:00 [INF] Route matched with {action = "Index", controller = "Error", area = "", page = ""}. Executing controller action with signature System.Threading.Tasks.Task1[Microsoft.AspNetCore.Mvc.IActionResult] Index(Int32) on controller Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Controllers.ErrorController (Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared). 2022-02-23 17:02:31.282 +08:00 [INF] Executing ViewResult, running view ~/Views/Error/500.cshtml. 2022-02-23 17:02:31.373 +08:00 [INF] Executed ViewResult - view ~/Views/Error/500.cshtml executed in 92.121ms. 2022-02-23 17:02:31.374 +08:00 [INF] Executed action Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Controllers.ErrorController.Index (Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared) in 110.2151ms 2022-02-23 17:02:31.374 +08:00 [INF] Executed endpoint 'Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Controllers.ErrorController.Index (Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared)'

  • User Avatar
    0
    gterdem created
    Support Team Senior .NET Developer

    Share your OIDC configuration please.

    Edit: If this issue is solved, can you move this conversation to your other issue at https://support.abp.io/QA/Questions/2644/OpenIdConnectAuthenticationHandler-messageState-is-null-or-empty--Where-do-I-need-to-configure-this-error. That represents the problem better. Can you re-open that issue and share OpenId configuration at module service configuration?

Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11