We are not able to connect to https server using webrequest or htmlagilitypack It showing below error
The underlying connection was closed: An unexpected error occurred on a receive.System.Net.WebException: or could not create SSL/TLS secure channel on server
Our code works fine on localhost and we also added following portion in my code file but we aren't able to identify why it's happening only on the server.
ServicePointManager.Expect100Continue = true;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;
if anyone has any idea on this then please share with us.