07-21-2003, 09:49 AM
Join Date: Dec 2002
I don't know if anyone else has run into this, but if your using a webclient, or webrequest, and you goto a site with an expired/invalid SSL certificate it will error.
Dim webreq As New Net.WebClient(), by() As Byte
by = webreq.DownloadData("https://paypal.com/i")
'Errors because the cert was issued to 'www.paypal.com'
webreq = new System
;// Errors because the cert was issued to 'www.paypal.com'System
Gives me a good 'System.Net.WebException: The underlying connection was closed: Could not establish trust relationship with remote server.'
Anyone know a work around (in vb or c#)? My connection must be secure (its not to paypal.com), I don't want to have to use a third party control for something that the net namespace can already do.
Thanks in advance.