title: How can I figure out an unknown error in an X509Chain?
body: <p>I've got a program that calls web services at customer sites, and since the web service is provided by a third party it requires SSL and I can't do anything about it.</p>
  
  <p>In most cases when there is an error it's because there is a self-signed certificate, so I am checking X509Chain.ChainElements.ChainElementStatus for the UntrustedRoot error and just ignoring it.  </p>
  
  <p>That's all fine, however I'm getting an error from a new client and the ChainElementStatus element just appears to be an empty array.  Any thoughts on what might cause that?  If I look at the certificate error in IE it just says the certificate was not issued by a trusted CA.</p>
  
  <p>EDIT: Adding the trace as Markus suggested, I see the following error coming back:</p>
  
  <blockquote>
  <pre><code>DateTime=2009-12-21T21:58:29.8719648Z
  </code></pre>
    
    <p>System.Net Information: 0 : [0772]
    SecureChannel#57280435 - Remote
    certificate has errors:
        ProcessId=4964
        DateTime=2009-12-21T21:59:15.3239262Z
    System.Net Information: 0 : [0772]
    SecureChannel#57280435 -  An internal
    certificate chaining error has
    occurred.</p>
  
  <pre><code>ProcessId=4964
  DateTime=2009-12-21T21:59:15.3239262Z
  </code></pre>
    
    <p>System.Net Information: 0 : [0772]
    SecureChannel#57280435 - Remote
    certificate was verified as invalid by
    the user.
        ProcessId=4964</p>
  </blockquote>