I've written a function in .NET that performs a get request to a website that's running on some type of SSL certificate. But the problem is the certificate is self-signed and the program will not connect since the certificate cannot be verified. My function is as follows:
static string Get_String(string url)
{
string output;
using (var wb = new WebClient())
{
var response = wb.DownloadString(url);
output = response;
}
return output;
}
Is there any way I can skip the process of certificate validation and just establish a secure connection over TLS protocol?