Programmatical Approach of using Lets Encrypt SSL Certificate from Microsoft .Net Application coding for API connections

The typical usage of System.Net.Http.HttpClient (and the underlying SslStream library) is completely compatible with web servers using Let’s Encrypt certificates. No extra code or configuration is required.

e.g.

using (HttpClient client = new HttpClient())
{
  var response = await client.GetAsync("http://letsencrypt.org");
  response.EnsureSuccessStatusCode();
  string responseBody = await response.Content.ReadAsStringAsync();
  Console.WriteLine(responseBody);
}

If you are experiencing issues with the above, then it indicates a misuse or misconfiguration in either your server or client. But we would need specific details about your issue to help you.

2 Likes