Open Closed

Unable to obtain configuration from: 'System.String'. #3112


User avatar
0
imranStem created

I have downloaded the microservice architecture and deployed it on the Kubernetes Ingress controller on Azure. I did the configuration changes in Gateways, Services, and Applications. I also set up the certificates on domains. I am getting the below error when I run the angular application or request app configuration from web gateway to product service, administration service.

The below exception log is from the product service.

  • ABP Framework version: v5.2.1
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes / no
  • Exception message and stack trace: Unable to obtain configuration from: 'System.String'.
  • Steps to reproduce the issue:" [14:15:48 ERR] Exception occurred while processing message. System.InvalidOperationException: IDX20803: Unable to obtain configuration from: 'System.String'. at Microsoft.IdentityModel.Protocols.ConfigurationManager1.GetConfigurationAsync(CancellationToken cancel) at Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler.HandleAuthenticateAsync() at Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler.HandleAuthenticateAsync() at Microsoft.AspNetCore.Authentication.AuthenticationHandler1.AuthenticateAsync() at Microsoft.AspNetCore.Authentication.AuthenticationService.AuthenticateAsync(HttpContext context, String scheme)

If you need, I can provide the URLs of all applications, and the app settings configurations to identify the issue.

Thanks Imrankhan Pathan


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

    Add

    Microsoft.IdentityModel.Logging.IdentityModelEventSource.ShowPII = true;
    

    to related application/microservice modules to see the detailed error.

  • User Avatar
    0
    imranStem created

    I called endpoint from web gateway swagger for administration api with authenticate.

    Here is the details error log

    System.InvalidOperationException: IDX20803: Unable to obtain configuration from: 'https://auth-server-v1.mycustomdomain/.well-known/openid-configuration'. at Microsoft.IdentityModel.Protocols.ConfigurationManager.GetConfigurationAsync(CancellationToken cancel) at Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler.HandleAuthenticateAsync() at Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler.HandleAuthenticateAsync() [15:06:12 ERR] Connection id "0HMHORVK9TC8J", Request id "0HMHORVK9TC8J:00000003": An unhandled exception was thrown by the application. System.InvalidOperationException: IDX20803: Unable to obtain configuration from: 'https://auth-server-v1.mycustomdomain/.well-known/openid-configuration'. at Microsoft.IdentityModel.Protocols.ConfigurationManager`1.GetConfigurationAsync(CancellationToken cancel) at Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler.HandleAuthenticateAsync() at Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler.HandleAuthenticateAsync() . . . [15:06:12 INF] Request finished HTTP/1.1 GET http://administration-service-v1.mycustomdomain/api/abp/api-definition - - - 500 0 - 6.5378ms

    When I called the /api/abp/api-configuration end point from swagger without authenticate ithen its working file but with authenticate, its throwing exceltion.

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

    Check your administrationService authserver configuration. It seems is it configured as https://auth-server-v1.mycustomdomain. So when you make a request, it tries to validate at this endpoint. However, it should check http://auth-server-v1.mycustomdomain in the internal network.

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