web-dev-qa-db-fra.com

Comment corriger: "InvalidOperationException: IDX20803: impossible d'obtenir la configuration à partir de: '[PII est masqué]'" "

J'ai déployé mon API et mon application client sur Docker mais pour la vie de moi, l'application Web ne peut pas appeler l'API, je reçois toujours l'exception ci-dessous:

J'ai ajouté la ligne ci-dessous suggérée dans d'autres articles mais cela n'a pas fonctionné,

IdentityModelEventSource.ShowPII = true;

    System.InvalidOperationException: IDX20803: Unable to obtain configuration from: '[PII is hidden]'.
    at Microsoft.IdentityModel.Protocols.ConfigurationManager`1.GetConfigurationAsync(CancellationToken cancel)
    at Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler.HandleAuthenticateAsync()
    at Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler.HandleAuthenticateAsync()
    at Microsoft.AspNetCore.Authentication.AuthenticationHandler`1.AuthenticateAsync()
    at Microsoft.AspNetCore.Authentication.AuthenticationService.AuthenticateAsync(HttpContext context, String scheme)
    at IdentityServer4.AccessTokenValidation.IdentityServerAuthenticationHandler.HandleAuthenticateAsync()
    at Microsoft.AspNetCore.Authentication.AuthenticationHandler`1.AuthenticateAsync()
    at Microsoft.AspNetCore.Authentication.AuthenticationService.AuthenticateAsync(HttpContext context, String scheme)
    at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
    at Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context)
    at Microsoft.AspNetCore.Cors.Infrastructure.CorsMiddleware.InvokeCore(HttpContext context)
    at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
6
Jane Senya

L'activation de TLS 1.2 a résolu le problème

ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12

0
Aypn