Unable to complete a connection

There is nothing wrong with this code. The issue is site security, Freshdesk uses TLS1.2. I was using .NET Framework 4.5.2 and that defaults to TLS1.1 – therefore it doesn’t work. Two solutions:

  1. Use a later framework. 4.7 certainly works as does .NET Core
  2. Add this line before the request:
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;

1 Like