System.Net.WebException: The request was interrupted: Failed to create a secure SSL / TLS channel. in System.Net.Httpwebrequest.getResponse ()
string html = string.empty;
String url = "https://google.com";
Httpwebrequest request = (httpwebrequest) webrequest.create (URL);
Request.keepalive = True;
// For every firefighter added in solutions to this error I saw the like
Request.credentials = CredentialCache.DefaultCredentials;
Using (httpwebresponse response = (httpwebresponse) Request.getResponse ())
Using (Stream Stream = Response.getResponseStream ())
Using (StreamReader Reader = New StreamReader (Stream))
{
HTML = Reader.ReadToEnd ();
}
Answer 1, Authority 100%
Try to specify the allowable protocols
servicepointmanager.securityprotocol = securityprotocoltype.ssl3 | SecurityProtocoltype.tls | SecurityProtocoltype.tls11 | SecurityProtocoltype.tls12;