web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

System.Net.WebException: 'The request was aborted: Could not create SSL/TLS secure channel.'

(0) ShareShare
ReportReport
Posted on by 2
Hello Community,
 
I'm trying to implement a web api call in X++ (D365FO).
Unfortunately, I'm facing an issue during the execution of the GetReponse() method below.
 
Extract of X++ Code 

      str user = /xxxxx/;
      str pass = /xxxxxxxxxxxxxxxxxxx/;
      System.Text.Encoding encoding = System.Text.Encoding::UTF8;
   System.Byte[] bytes = encoding.GetBytes(user + /:/ + pass);
   System.String base64 = System.Convert::ToBase64String(bytes);

   System.String headerKey = /Authorization/;
   System.String headerValue = /Basic / + base64;
   request = System.Net.WebRequest::Create(API URL);

   System.Net.WebHeaderCollection headers = request.Headers;
   request.set_Headers(headers);
   request.Method = /GET/;

      response = request.GetResponse();

Error Message during the execution of GetResponse() Method
The request was aborted: Could not create SSL/TLS secure channel.
 
Investigating in this forum, it seems that some people faced this issue in the past, but I didn't find a clear fix.
Can someone please help ?
 
Thanks
 
Regards,

Samir
  • Suggested answer
    Martin Dráb Profile Picture
    241,645 Most Valuable Professional on at
    Try changing the security protocol to TLS 1.2:
    System.Net.ServicePointManager::SecurityProtocol = System.Net.SecurityProtocolType::Tls12;
     
     
     
  • SO-27040929-0 Profile Picture
    2 on at
    Hi Martin,
     
    Thx for your feedback.
    I've already tried this but it didn't work.
     
    Regards,
     
    Samir
  • Suggested answer
    Kevin Xia Profile Picture
    Microsoft Employee on at
    Hi,
    You can check out this old thread where the questioner has a similar question to yours: "The request was aborted: Could not create SSL/TLS secure channel." On API Call (dynamics.com). It comes out to be the ciphers that were not configured on D365 FnO VMs
    Best regards,
    Kevin

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 264 Super User 2026 Season 2

#2
Aayush Tiwari Profile Picture

Aayush Tiwari 219

#3
Subra Profile Picture

Subra 164 Super User 2026 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans