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.
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.
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.
EDIT: Adding the trace as Markus suggested, I see the following error coming back:
DateTime=2009-12-21T21:58:29.8719648Z
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.
ProcessId=4964 DateTime=2009-12-21T21:59:15.3239262Z
System.Net Information: 0 : [0772] SecureChannel#57280435 - Remote certificate was verified as invalid by the user. ProcessId=4964