Tuesday, April 22, 2014

List locally installed digital certificates with C#

X509Store store = new X509Store(StoreName.Root,StoreLocation.LocalMachine);
store.Open(OpenFlags.ReadOnly);
Console.WriteLine("Friendly Name\t\t\t\t\t Expiration date");
foreach (X509Certificate2 certificate in store.Certificates)
{
   Console.WriteLine("{0}\t{1}", certificate.FriendlyName,certificate.NotAfter);
}
store.Close();
 
Note: You should import this namespace (System.Security.Cryptography.X509Certificates) 

Keyset does not exist

I got this error message when get installed certificates in my server. The problem was permission issue. Follow these steps to resolve it.
 1) Open Windows Explorer and navigate to the directory where the keys are located: C:\Documents and Settings\All Users\Application Data\Microsoft\Crypto\RSA\MachineKeys

 2) Make sure you’re not using the "Simple File Sharing" mode in Windows Explorer. In the Windows Explorer Tools menu, select "Folder Options". Then select the "View" tab. Scroll down and make sure the "Use simple file sharing" checkbox is unchecked.

3) Right-click on the MachineKeys folder. Select "Properties", then select the "Security" tab. (Note: If you didn’t turn off simple file sharing, you wouldn’t see the "security" tab.)

 4) You’re going to add your IUSR_**** account and give it full permission. Click the "Add.." button. Type your IUSR account name and click "Check Names". Then click "OK".

5) The IUSR account is now listed. Select it and then check the "Full Control" checkbox (causing all the other Allow checkboxes to be selected). Then click "Apply". Thanks

TinyMCE Insert/Edit link not editable

 To fix this add  e.stopImmediatePropagation()  as below. $(document).on('focusin', function (e) {             if ($(e.target).close...