Customizing Dynamics NAV
Discover different ways to customize the application to give you and your colleagues access to the features, functionality, and data that you need most.
Dynamics 365 2019 release wave 2 plan Discover the latest updates to Dynamics 365.Release Plan | Weekly Deployment Notes
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants.Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements.
ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance and Operations TechTalks | Customer Engagement TechTalks | Talent TechTalks
Working in NAV 2017, I'm trying to use CU1290 SOAP Web Service Request Mgt. to send a request and get a response from a server using a self-signed certificate. I've installed the certificate on the server with certlm in Trusted Root Certificate Authorities. I can make the request through my browser (which does still show a certificate error) but calling through the NAV library and eventually DotNet's System.Het.HttpWebRequest.GetResponse, I get the failure message "The remote certificate is invalid according to the validation procedure."
I see from the DotNet forums that you can override the certificate validation logic by installing a callback for ServicePointManager.ServerCertificateValidationCallback (https://stackoverflow.com/questions/1189897/net-programming-what-to-validate-on-an-ssl-self-signed-certificate).
The problem is, I can't figure out how to load a callback from within C/AL. Is this possible? Is there another way to disable the certificate test, ideally on a call-by-call basis? Should I just do all this in DotNet and give up on CU1290?
// get the response
ResponseXmlDoc := ResponseXmlDoc.XmlDocument;
that won't work using cu 1290 and .net class httpwebrequest.
as you found also out, what you need for certificates like that is following c# code in nav:
System.Net.ServicePointManager.ServerCertificateValidationCallback = delegate(Object obj, X509Certificate X509certificate, X509Chain chain, System.Net.Security.SslPolicyErrors errors)
that's not possible in nav.
i had that issue, developed then a .net lib for the complete web service call in c#.
Thanks for your prompt response, Stefano. I did have DisableHttpsCheck, but that didn't help. I believe that DisableHttpsCheck is intended to permit use of http (instead of requiring https.) My problem is that the target services was https using a self-signed certificate.
correct, DisableHttpsCheck is for using http.
Did you solve your problem?
Business Applications communities