Basically when i am run my application on my localhost i can get all installed certificate list in certificate store. But now same thing i am looking. Host application on server and get certificate list from end user machine and bind into dropdown list. Where user will select certificate and select pdf file then sign the document. That sign document will store on server/dowload files on user machine
Please help me. Thanks. Sorry for my bed English
public static List<X509Certificate2> GetCurrentUserCertificates()
{
List<X509Certificate2> certificates = new List<X509Certificate2>();
X509Store store = new X509Store(StoreName.My, StoreLocation.CurrentUser);
store.Open(OpenFlags.OpenExistingOnly);
foreach (X509Certificate2 cert in store.Certificates)
{
certificates.Add(cert);
}
return certificates;
}