I need to populate system certificates. Same source code tells me the certificates count correctly when I debug it under VS. When I run the code under IIS 7.5 Windows 7, .Count always returns 0. Is there any permission problem? Why does the count return 0?
System.Security.Cryptography.X509Certificates.X509Store store = new System.Security.Cryptography.X509Certificates.X509Store(System.Security.Cryptography.X509Certificates.StoreName.My);
store.Open(System.Security.Cryptography.X509Certificates.OpenFlags.ReadOnly);
Response.Write("<hr>Certs count: " + store.Certificates.Count.ToString() + "<br>");