
My client is experiencing an error when he is trying to submit VAT Return with MTD Module. They are using NAV 2015 and were able to submit the VAT return before.
Now they are getting he following error message:
Connection to the remote server could not be established. Could not create SSL/TSL secure channel.
Have you seen this error message before? How can I fix it?
Thanks
Hello
is a known issue we are experiecing in the last week in particulat to old Dynamics nav version
I can offer the following solutions:
we added the possibility to add the SecurityProtocol key in CustomSettings.config
Check if they can add that key and set the value to Tls12 and restart the NAV service.
<add key="SecurityProtocol" value="Tls12" />
Or a second solution is the following:
(the attached codeunit is for 2018 but you can just add the line you need in your environment)
It serves for any http requests for MTD feature.
I added there function “AddSecurityProtocolTls12”.
Codeunit 1297
PROCEDURE InvokeJSONRequest@66(RequestJson@1002 : Text;VAR ResponseJson@1001 : Text;VAR HttpError@1009 : Text) : Boolean;
BEGIN
AddSecurityProtocolTls12;//new line
PROCEDURE AddSecurityProtocolTls12@30();
VAR
Convert@1000 : DotNet "'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.System.Convert";
SecurityProtocolType@1001 : DotNet "'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.System.Net.SecurityProtocolType";
SecurityProtocol@1002 : Integer;
BEGIN
SecurityProtocol := Convert.ToInt32(SecurityProtocolType.Tls12);
AddSecurityProtocol(SecurityProtocol);
END;
And retry.
Third one
go to the Registry Keys (in the server where the affected organization is hosted), and first please backup the original registry before do any action.
Then, go to the following Keys and add the values below:
Add new two values in both:
Restart the machine
Hope this help