Skip to main content

Notifications

Microsoft Dynamics AX (Archived)
Answered

Consuming TLS 1.2 only web service

Posted on by Microsoft Employee

Hello everyone,

I'm starting to go a little crazy after exhausting hours into a sudden issue I am having.

I am running Dynamics AX 2012 R2 (Version: 6.2.1000.9655) and I'm consuming a web service through a custom class which builds a SOAP envelope by hand and using HttpRequest.

The code has worked fine for years but the web service is making an upcoming change where they will only allow TLS 1.2 connections and everything else will be refused.

In preparation for this, access to a web service that ONLY accepts TLS 1.2 connections has been made available alongside the current production environment which still accepts TLS 1.0.

When consuming the current production environment, everything continues to work as expected, but once I change my endpoint to the TLS 1.2 environment, I am receiving this error message:

Method 'send' in COM object of class 'Microsoft.XMLHTTP' returned error code 0x800C0005 (<unknown>) which means: The system cannot locate the resource specified.

I opened Fiddler and reran the code in Dynamics AX and the error response changed to this (While Fiddler is open):

Method 'send' in COM object of class 'Microsoft.XMLHTTP' returned error code 0x800C0008 (<unknown>) which means: The download of the specified resource has failed.

Fiddler also shows this in the text view of the request:

Version: 3.1 (TLS/1.0)

With the following error:

fiddler.network.https> HTTPS handshake to webserviceURL (for #3) failed. System.IO.IOException Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. < An existing connection was forcibly closed by the remote host


I could be wrong, but I am taking this as the request is not being made with TLS 1.2 but I have done the following to try and correct this with no luck:

1. I've followed this URL https://success.outsystems.com/Support/Enterprise_Customers/Maintenance_and_Operations/(.NET)_Enable_SSL_Protocols_for_your_Integrations_-_TLS_1.1_and_TLS_1.2 and added the requested registry keys to try and force .NET to TLS 1.2.

2. I've edited this line of the Ax32.Exe.Config file to at least specify a 4.5 version of .NET <supportedRuntime version="v4.0.30319" sku=".NETFramework,Version=v4.5.1"/>

3. I've added this line of code before I call the web service in X++ System.Net.ServicePointManager::set_SecurityProtocol(System.Net.SecurityProtocolType::Tls12);

Lastly, I have a few web applications (ASP.NET MVC) that run on a different server and I added this line of C# code - ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 to them and they appear to connect to the TLS 1.2 web service just fine.

Can anyone please offer me any assistance regarding AX on this issue?

Thank you so much!

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Consuming TLS 1.2 only web service

    Hey,

    Did you run the easy fix on the AOS to resolve the issue?

    Cheers

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Consuming TLS 1.2 only web service

    After hours of continued searching, I ran into this article support.microsoft.com/.../update-to-enable-tls-1-1-and-tls-1-2-as-a-default-secure-protocols-in which supplied an 'Easy Fix' file that added a few registry keys.

    I rebooted the machine afterwards and it appears to be working from Dynamics AX 2012 now.

    Thanks everyone.

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Complete!

🔔 Be sure to subscribe to the new forums you are interested in to stay up to date! 🔔

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 229,918 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans