RE: HMRC MTD submission error
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:
- HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v2.0.50727
- HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319
Add new two values in both:
- SystemDefaultTlsVersions - type dword, value 1
- SchUseStrongCrypto - type dword, value 1
Restart the machine
Hope this help