I'm in a need to bypass certificate error on HttpWebRequest used in Dynamics AX 2009. I found some fancy code that works perfectly fine in .NET:
private bool ValidateCert(object sender,
X509Certificate cert,
X509Chain chain,
System.Net.Security.SslPolicyErrors error)
{
return true;
}
private void Form1_Load(object sender, EventArgs e)
{
System.Net.ServicePointManager.ServerCertificateValidationCallback +=
new System.Net.Security.RemoteCertificateValidationCallback(ValidateCert);
}
However it does seem like System.Net.Security.RemoteCertificateValidationCallback cannot be accessed through Dynamicx AX. Is there any workaround for it to work? (except of making .NET dll and atatching it to Axapta)