Re: Requesting web page from SSL site fails

From: Joe Kaplan \(MVP - ADSI\) (joseph.e.kaplan_at_removethis.accenture.com)
Date: 01/13/05


Date: Wed, 12 Jan 2005 19:23:05 -0600

BTW, you can control that behavior in .NET code by implementing your own
custom ICertificatePolicy class and setting that on the ServicePointManager,
but fixing the cert is always best.

Joe K.

"Tim Mavers" <webview@hotmail.com> wrote in message
news:VNWdnfubE6Sp83jcRVn-uQ@giganews.com...
> "Joe Kaplan (MVP - ADSI)" <joseph.e.kaplan@removethis.accenture.com> wrote
> in message news:udaOdDD9EHA.3236@TK2MSFTNGP15.phx.gbl...
>> The main reason SSL requests with HttpWebRequest fail is something wrong
>> with the server certificate (name on cert doesn't match the hostname
>> requested by client, cert is revoked, cert is expired, cert is not
>> trusted). It is less likely that you need a client certificate, although
>> the server may be requesting one. You should be able to find that out
>> with a web browser or something.
>
> Yes, that was the problem, there as an issue with the cert on the server.
> We were getting warning dialogs about "cert not being fully trusted", but
> accepting "yes" would work fine (from the browser). However, apparently
> the API itself will default to reject this.
>
> Once we straightened out the cert, HttpWebRequest works fine.
>
> Thanks for all the help.
>