Erin,
Sure.
System.Security .Cryptography.X 509Certificates .X509Certificat e cert =
System.Security .Cryptography.X 509Certificates .X509Certificat e.CreateFromCer t
File(@certPath) ;
ServicePointMan ager.Certificat ePolicy = new CertPolicy();
HttpWebRequest tuReq = (HttpWebRequest )WebRequest.Cre ate(addr + "?" + TU);
tuReq.ClientCer tificates.Add(c ert);
tuReq.ContentTy pe = "applicatio n/x-www-form-urlencoded";
tuReq.Method = "GET";
Make sure you have a class (either your class or another) that implements
ICertificatePol icy or your app will hang because of the untrusted cert
issue.
EX:
class CertPolicy: ICertificatePol icy
{
public bool CheckValidation Result(ServiceP oint srvPoint, X509Certificate
certificate,
WebRequest request, int certificateProb lem)
{
return true;
}
}
Alex
"EMonaco" <er********@nos pam.net> wrote in message
news:Oo******** ******@tk2msftn gp13.phx.gbl...
Is there any way to programmaticall y select a particular client
certificate and associate it with an HttpWebRequest instance? I know using WinINet
this was possible.
Erin.