当我调用外部服务时,我必须发出以下错误:无法建立SSL连接,请参见内部异常。经过长时间的搜索,我发现我必须将servercertificatecustomvalidationcallback添加到我的HttpClient中,我的代码如下 public class ApiClientconfig.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
}); 我的问题是如何添加<e
我为本地测试运行了一个自签名(HTTPS) C# web服务器,我无法从运行在同一台PC上的其他C#应用程序访问这个c#应用程序。其他应用程序显示错误System.Net.Http.CurlException: Peer certificate cannot be authenticated with given CA certificates certutil -d sql:$HOME/..pki
目前,我在Flurl上工作,我试图联系https中的一个API (我在我的实验室)。因此证书无效,Flurl无法继续工作:/Unhandled Exception: System.AggregateException: One or more errors occurred. (Call failed. The SSL connection could not be established, see inner exception. POST https://IP/api/aaaLogin.json) ---> Flurl.Http.FlurlHttpExcept