HttpClient
HttpClientHandler
The error message:The SSL connection could not be established, see inner exception
HttpClientHandler clientHandler = new HttpClientHandler(); clientHandler.ServerCertificateCustomValidationCallback = (sender, cert, chain, sslPolicyErrors) => { return true; }; HttpClient client = new HttpClient(clientHandler);
try { ... } catch ( Exception ex ) { ... if ( ex.InnerException != null ){ "display" ex.InnerException.Message; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)