'C#, HTTP client, SSL connection could not be established

I am using http client handler in my code, as shown below :

HttpClientHandler clientHandler = new HttpClientHandler();
clientHandler.ServerCertificateCustomValidationCallback = (sender, `cert, chain, sslPolicyErrors) => { return true; };

But I am still geting : Type:HttpRequestException; Message:The SSL connection could not be established, see inner exception.Type:IOException; Message: Received an unexpected EOF or 0 bytes from the transport stream.

Can someone help with the resolution???



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source