Security protocol TLS 1.2 in Dynamics NAV 2013

MrJan
Member Posts: 2
Hi out there!
I am trying to increase a web requests security protocol in order to access a web service which is requiring TLS 1.2.
My default SSL is not accepted.
The request is send from Dynamics NAV 2013 (7.00).
I have of course searched for a solution to this problem elsewhere. One single line should be enough:
ServicePointManager.SecurityProtocol := 3072;
This however does not grant me access to the server.
HttpWebRequest := WebRequest.Create(txtURLiLG);
ServicePointManager.SecurityProtocol := 3072; // 3072 = Tls12 (TLS 1.2)
HttpWebRequest.Timeout := 600000; // 10 minutes
HttpWebRequest.ReadWriteTimeout := 600000; // 10 minutes
HttpWebRequest.ContentType := 'text/xml;charset=utf-8';
HttpWebRequest.Method := 'POST';
SystemTextUTF8Encoding := SystemTextUTF8Encoding.UTF8Encoding();
Bytes := SystemTextUTF8Encoding.GetBytes(XMLDoc.InnerXml);
HttpWebRequest.ContentLength := Bytes.Length;
RequestStream := HttpWebRequest.GetRequestStream();
RequestStream.Write(Bytes, 0, Bytes.Length);
RequestStream.Close;
Do any of you have a hint setting securety protocol to TLS 1.2 in Dynamics NAV?
Thanks.
Best regards
Jan
I am trying to increase a web requests security protocol in order to access a web service which is requiring TLS 1.2.
My default SSL is not accepted.
The request is send from Dynamics NAV 2013 (7.00).
I have of course searched for a solution to this problem elsewhere. One single line should be enough:
ServicePointManager.SecurityProtocol := 3072;
This however does not grant me access to the server.
HttpWebRequest := WebRequest.Create(txtURLiLG);
ServicePointManager.SecurityProtocol := 3072; // 3072 = Tls12 (TLS 1.2)
HttpWebRequest.Timeout := 600000; // 10 minutes
HttpWebRequest.ReadWriteTimeout := 600000; // 10 minutes
HttpWebRequest.ContentType := 'text/xml;charset=utf-8';
HttpWebRequest.Method := 'POST';
SystemTextUTF8Encoding := SystemTextUTF8Encoding.UTF8Encoding();
Bytes := SystemTextUTF8Encoding.GetBytes(XMLDoc.InnerXml);
HttpWebRequest.ContentLength := Bytes.Length;
RequestStream := HttpWebRequest.GetRequestStream();
RequestStream.Write(Bytes, 0, Bytes.Length);
RequestStream.Close;
Do any of you have a hint setting securety protocol to TLS 1.2 in Dynamics NAV?
Thanks.
Best regards
Jan
0
Answers
-
check if .net framework 4.5 is installed. if not install it.
.net 4.0 does not support TLS 1.2.best regards
Franz Kalchmair, MVP
Alias: Jonathan Archer
please like / agree / verify my answer, if it was helpful for you. thx.
Blog: http://moxie4nav.wordpress.com/1 -
Thanks archer89.
The .net framework 4.5 is already installed.
Best regards
Jan0 -
Hi,
I am currently facing same issue, have you any thought how to change the security protocol?0 -
Is there a solution yet? Having same issue with NAV 20161
-
Hi Agannalo,
I need a solution for Dynamics NAV 2016. The members you're showing above are not available as DotNet-Types to create variables. .NET Framework 4.5 is installed.
Oki
0 -
0
-
Thanks Agannalo, it works for me..0
-
Hello,
Did you get any solution? I expose here my issues..
https://forum.mibuso.com/discussion/76151/problem-using-tls12-13-for-connection-with-webservice#latest
I've followed the tips given in this post, but I still getting the error shown in my post...0 -
Sorry to wake old thread, but please find below resolution (As Agannalo previously stated). This worked for me with NAV2017. I just hope the customers would update at last.
First create a global .NET variable for System.Net.ServicePointManager, and then call it withServicePointManager.SecurityProtocol := SecurityProtocolType.Tls12;
2 -
Cannot find System.Net.ServicePointManager in .NET variable. I've 4.8 .NET framework installed..0
-
Hello weneed,
you can find it in the System Assembly.
See here:
https://docs.microsoft.com/de-de/dotnet/api/system.net.servicepointmanager?view=netframework-4.8
In the top left Corner you can change the Version.
If you input the following string into the subtype it should work:System.Net.ServicePointManager.'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
1 -
Thanks so much!!0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions