3 回答

TA貢獻1852條經驗 獲得超7個贊
對我來說,問題通過添加解決了
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12

TA貢獻1998條經驗 獲得超6個贊
我終于解決了這個問題。我知道這與證書有關,但我不確定該怎么做。
我的解決方法是將 options.BackchannelHttpHandler 添加到
private readonly HttpClientHandler _handler;
public Startup(IHostingEnvironment env, IConfiguration config,
ILoggerFactory loggerFactory)
{
_env = env;
_config = config;
_loggerFactory = loggerFactory;
Configuration = config;
_handler = new HttpClientHandler();
_handler.ClientCertificates.Add(FindClientCertificate());//same x509cert2 that proxy server uses
_handler.AllowAutoRedirect = true;
}
.....
AddOpenIdConnect( scheme, options => {
....
options.BackchannelHttpHandler = _handler;
...
}

TA貢獻1818條經驗 獲得超7個贊
花了一個不眠之夜來解決這個問題。下面的代碼解決了我的問題。
服務 .AddIdentityServer(options => {
options.IssuerUri = <Authority Url>; //<== Added this one options.Events.RaiseSuccessEvents = true; options.Events.RaiseFailureEvents = true; options.Events.RaiseErrorEvents = true; })
- 3 回答
- 0 關注
- 352 瀏覽
添加回答
舉報