Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Suggested answer

HMRC MTD submission error

Posted on by 55

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

  • Suggested answer
    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

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,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans