For a secure application I need to select a certificate in a dialog.
How can I access certificate store or a part of it (e.g. storeLocation="Local Machine"
and storeName="My"
) using C# and get a collection of all certificates from there? Thanks in advance for your help.
X509Store store = new X509Store(StoreName.My, StoreLocation.LocalMachine);
store.Open(OpenFlags.ReadOnly);
foreach (X509Certificate2 certificate in store.Certificates){
//TODO's
}