/ Published in: C#
Generate the Cert:
makecert -sy 3 -n "cn=FooCorp" -ss my -sr LocalMachine
Grant Permissions to the Cert:
winHttpCertCfg -g -c LOCAL_MACHINE\MY -s "FooCorp" -a "domain\YourMomma"
makecert -sy 3 -n "cn=FooCorp" -ss my -sr LocalMachine
Grant Permissions to the Cert:
winHttpCertCfg -g -c LOCAL_MACHINE\MY -s "FooCorp" -a "domain\YourMomma"
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
public static X509Certificate2 GetCert(string thumbprint, StoreName storeName, StoreLocation storeLocation) { // The following code gets the cert from the keystore store.Open(OpenFlags.ReadOnly); X509Certificate2Collection certCollection = store.Certificates.Find(X509FindType.FindByThumbprint, thumbprint, false); X509Certificate2Enumerator enumerator = certCollection.GetEnumerator(); X509Certificate2 cert = null; while (enumerator.MoveNext()) { cert = enumerator.Current; } return cert; }
URL: http://support.microsoft.com/default.aspx?scid=kb;en-us;901183