Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX forum
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 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 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 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 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.

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 288,420 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,672 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans