Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Suggested answer

API Call from X++/C# failing with "Request was aborted could not create ssl/tls secure channel"

Posted on by 50

I am trying to send a GET/POST call to an API with API key authentication. It fails while getting a response with the error "Request was aborted could not create ssl/tls secure channel ". I have tried all the possible changes provided in the blogs like assigning Security protocol type to TLS1.2 to the security point manager, Enabling TLS1.1,1.2 from the settings, adding it to the trusted site, etc.

Any help will be appreciated.

  • Suggested answer
    RE: API Call from X++/C# failing with "Request was aborted could not create ssl/tls secure channel"

    This has been resolved. The issue was with the Cipher suite mismatch for cloud hosted environments. Once the value was modified from the registry editor, it works fine from IE as well as code.

  • RE: API Call from X++/C# failing with "Request was aborted could not create ssl/tls secure channel"

    So, the URL works in Chrome but not in IE from the VM. I set chrome as the default browser and ran my code, getting the same issue. Any thoughts?

  • ergun sahin Profile Picture
    ergun sahin 8,812 Super User 2024 Season 1 on at
    RE: API Call from X++/C# failing with "Request was aborted could not create ssl/tls secure channel"

    Can you look for certificate and connection values via internet explorer. Is there any invalid value?

  • RE: API Call from X++/C# failing with "Request was aborted could not create ssl/tls secure channel"

    From my local system, I am getting a response through the URL.

    7120.Screenshot-_2800_26_2900_.png

  • ergun sahin Profile Picture
    ergun sahin 8,812 Super User 2024 Season 1 on at
    RE: API Call from X++/C# failing with "Request was aborted could not create ssl/tls secure channel"

    Nope, I don't think you have a code related problem. Operating system, security, registry etc.

    Did you try from a different environment, maybe from local (web browser or Visual studio)

  • RE: API Call from X++/C# failing with "Request was aborted could not create ssl/tls secure channel"

    I have already tried the coding changes suggested in the link. It did not help.

  • ergun sahin Profile Picture
    ergun sahin 8,812 Super User 2024 Season 1 on at
    RE: API Call from X++/C# failing with "Request was aborted could not create ssl/tls secure channel"

    The code can give this error for many different reasons. The first ones that come to my mind are .Net framework, certificate, Ciphers, WebRequest.Timeout = 0 ...

    However, you can't even see it from explorer. You have a different problem. You can check out the link below

    stackoverflow.com/.../the-request-was-aborted-could-not-create-ssl-tls-secure-channel

  • RE: API Call from X++/C# failing with "Request was aborted could not create ssl/tls secure channel"

    No, I did not change registry too. Its a regular 2 tier cloud machine deployed from LCS.

  • ergun sahin Profile Picture
    ergun sahin 8,812 Super User 2024 Season 1 on at
    RE: API Call from X++/C# failing with "Request was aborted could not create ssl/tls secure channel"

    Do you have a firewall or did you changed registry. What OP system you have (From explorer image I can see your status is not code related)

  • RE: API Call from X++/C# failing with "Request was aborted could not create ssl/tls secure channel"

    Thats right, I ran the job that is provided in the link which shows TLS12 as enabled.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans