"The underlying connection was closed: An unexpected error occurred on a send." With SSL Certificate

For me it was tls12:

ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;

If you are stuck with .Net 4.0 and the target site is using TLS 1.2, you need the following line instead. ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072;

source: TLS 1.2 and .NET Support: How to Avoid Connection Errors