title: Ignoring SSL certificate error for HttpWebRequest in Dynamics AX 2009
body: <p>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:</p>
  
  <pre><code>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);  
  } 
  </code></pre>
  
  <p>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)</p>