# Tuesday, December 09, 2003

I'm making a web request to a site that uses certificate authentication, and it's the first time I've done that with .NET, so bear with me.  I'm doing something like the following...

HttpWebRequest req = (HttpWebRequest)WebRequest.Create("https://mysite.com");

X509Certificate x509 = X509Certificate.CreateFromCertFile(@"c:\temp\mycert.cer");

req.ClientCertificates.Add(x509);

That works fine, but it seems like there should be an easier way.  The certificate already exists in my local certificate store, or I'm pretty sure this wouldn't work at all, so why do I have to export the cert to a .cer file in order to use it?  Shouldn't I be able to get a reference to it directly from the certificate store?  Or would that involve too much unmanaged yuckiness?  It just seems like an extra step, and administrative hassle, but maybe that's just the way it is. 

Any suggestions or feedback welcome.

[UPDATE]

Got it. 

Tuesday, December 09, 2003 8:58:54 PM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [0]  | 

I've upgraded to the newly released dasBlog 1.5 (it went smoothly as usual).  Kudos to Omar for the new DasBlog theme.  I use firebird, and his new theme looks fabulous. 

If only FreeTextBox worked under firebird, I could die fulfilled. 

Tuesday, December 09, 2003 8:13:09 PM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [0]  |