web-dev-qa-db-ja.com

修正方法:「InvalidOperationException:IDX20803:Unable to get configuration from: '[PII is hidden]'」

私は自分のAPIとクライアントアプリをdockerにデプロイしましたが、私が生きている間、Webアプリはapiを呼び出すことができません。次の例外が発生し続けます。

他の投稿で提案された以下の行を追加しましたが、機能しませんでした、

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

TLS 1.2を有効にすると問題が解決しました

ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12

0
Aypn