2

将 .NetCoreApp 2.0 升级到 2.1 并开始出现错误

从https://ims/.well-known/openid-configuration解析发现文档时出错:

连接到https://ims/.well-known/openid-configuration 时出错:连接尝试失败,因为连接方在一段时间后没有正确响应,或者连接失败,因为连接的主机没有响应

Startup.cs 中的代码 ->

services.AddAuthentication()
                    .AddIdentityServerAuthentication(options =>
                    {
                        options.Authority = this.Configuration["Authentication:Authority"];
                        options.ApiName = this.Configuration["Authentication:ApiName"];
                        options.ApiSecret = this.Configuration["Authentication:ApiSecret"];

                        options.EnableCaching = true;
                        options.RequireHttpsMetadata = true;

                         var certException = new CertException(this.Configuration["Authentication:Thumbprint"]);
                            options.IntrospectionDiscoveryHandler = certException.CreateHandler();
                            options.IntrospectionBackChannelHandler = certException.CreateHandler();
                            options.JwtBackChannelHandler = certException.CreateHandler();

                    });

当我从本地开发视觉工作室访问托管在云上的身份服务器时,就会发生这种情况。

4

0 回答 0