The request was aborted: Could not create SSL/TLS secure channel

Kumari, Sonam 0 Reputation points
2023-08-03T08:42:43.7633333+00:00

Problem Statement

The request was aborted: Could not create SSL/TLS secure channel

We have written an .net application which calls Newrelic API from our .net web application.

This code has been working for many years suddenly we started seeing some issues.

Code Snippet

TLS Line

ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };
System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3
                                                | SecurityProtocolType.Tls12
                                                | SecurityProtocolType.Tls11
                                                | SecurityProtocolType.Tls;

API Call

Http response as null url(https://insights-api.newrelic.com/xx/accounts/xxxxxx/query?nrql=)

Started Observing

when we run this application locally from our instance it is working fine but whenever we try it from AWS EC2 Windows Server 2012 R2 Standard we started seeing error but noticebly this was working for last 2 years and stopped working for last one week.

Looking for some advise, what are the steps should be taken in order to fix this issue.

Developer technologies | ASP.NET | Other
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.