for the code below, it catches an HttpRequestException/ System.Net.Http.WinHttpException when called
the exception states:
NativeErrorCode 12175
M
I talked with the owner of the server/service. They are providing a brand new service, and the service is currently using a self-signed certificate. Until the server/service is using a real certificate that can be verified via a certificate authority, Im going to bypass certificate verification in my code:
using (var httpClientHandler = new HttpClientHandler())
{
httpClientHandler.ServerCertificateCustomValidationCallback = (message, cert, chain, errors) => { return true; };
using (var client = new HttpClient(httpClientHandler))
{
try
{
client.BaseAddress = new Uri("https://test-org.com/");