The remote certificate is invalid according to the validation procedure

edwinschutten
Member Posts: 18
The customer created a new test server. We installed Dynamics NAV2017 CU28.10.0.28682 version that connects to the existing test database.
We are using a webservice to send files to external party "HL". First we try to establish a connection by using HttpWebRequest with the HTTPS url of HL and with an Ocp-Apim-Subscription-Key in the header.
The connection failed with error ''The remote certificate is invalid according to the validation procedure".
When we do this with Postman, the connection is succesfully established.
So what is going wrong?
We are using a webservice to send files to external party "HL". First we try to establish a connection by using HttpWebRequest with the HTTPS url of HL and with an Ocp-Apim-Subscription-Key in the header.
The connection failed with error ''The remote certificate is invalid according to the validation procedure".
When we do this with Postman, the connection is succesfully established.
So what is going wrong?
0
Best Answer
-
We found the problem. When retrieving the certificate from the certificate authority, an URL of the revocation list was send back. This URL was different than the HTTPS URL.
Dynamics tried to retrieve the revocation list by using this URL, but the firewall was blocking the URL. Therefore the revocation list could not be checked and the HTTPS channel was not created.
A piece of the .Net debug information:
System.Net Information: 0 : [2884] SecureChannel#24816868 - Remote certificate has errors:
System.Net Information: 0 : [2884] SecureChannel#24816868 - The revocation function was unable to check revocation for the certificate.
System.Net Information: 0 : [2884] SecureChannel#24816868 - The revocation function was unable to check revocation because the revocation server was offline.
System.Net Information: 0 : [2884] SecureChannel#24816868 - Remote certificate was verified as invalid by the user.
System.Net.Sockets Verbose: 0 : [2884] Entering Socket#34867337::Dispose()
System.Net Error: 0 : [2884] Exception in HttpWebRequest#50053605:: - The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel..
System.Net Error: 0 : [2884] Exception in HttpWebRequest#50053605::GetResponse - The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel..
0
Answers
-
Hi @edwinschutten !
I am facing the same problem. Did you find any solution?0 -
[Topic moved from 'General Chat' forum to 'NAV Three Tier' forum]
Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
We found the problem. When retrieving the certificate from the certificate authority, an URL of the revocation list was send back. This URL was different than the HTTPS URL.
Dynamics tried to retrieve the revocation list by using this URL, but the firewall was blocking the URL. Therefore the revocation list could not be checked and the HTTPS channel was not created.
A piece of the .Net debug information:
System.Net Information: 0 : [2884] SecureChannel#24816868 - Remote certificate has errors:
System.Net Information: 0 : [2884] SecureChannel#24816868 - The revocation function was unable to check revocation for the certificate.
System.Net Information: 0 : [2884] SecureChannel#24816868 - The revocation function was unable to check revocation because the revocation server was offline.
System.Net Information: 0 : [2884] SecureChannel#24816868 - Remote certificate was verified as invalid by the user.
System.Net.Sockets Verbose: 0 : [2884] Entering Socket#34867337::Dispose()
System.Net Error: 0 : [2884] Exception in HttpWebRequest#50053605:: - The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel..
System.Net Error: 0 : [2884] Exception in HttpWebRequest#50053605::GetResponse - The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel..
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