/// <summary>Adds client certificate from a cert file to a http web
request.</summary>
/// <param name="req">Http web request.</param>
/// <param name="fileName">Certificate file name.</param>
public static void AddCertificateFromCertFile (HttpWebRequest req, string
fileName)
{
System.Security.Cryptography.X509Certificates.X509 CertificateCollection
certColl = req.ClientCertificates;
System.Security.Cryptography.X509Certificates.X509 Certificate cert =
System.Security.Cryptography.X509Certificates.X509 Certificate.CreateFromCert
File (fileName);
req.ClientCertificates.Add (cert);
}
Eliyahu
"Frank" <fr***@hubhop.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
Problem....
I need some help, i got an implementation manual wich uses asp (not
.net) code as example. In this example the object 'WinHttp' is
initiated. Now this is an com object and since i'm working in c# i
would like to use managed code. So i figured that i should use the
'HttpWebRequest'. All fine but the WinHttp has got an option to set and
ClientCertificate.
Is there a way a can set an ClientCertificate with HttpWebRequest?
Are there any other options in managed code?