hi all, I have installed a certificate that has to pass into a httpwebrequest to access a third party API.. so I have installed certificate into local machine root store and granted access to IIS application pool identity user using winhttpcertcfg
C:\Program Files (x86)\Windows Resource Kits\Tools>winhttpcertcfg.exe -g -c local_machine\my -s "certificateissuedname" -a "servername/apppoolusername"
I have tried below code to find certificate but no luck certificate count 0.
X509Store keystore = new X509Store(StoreName.Root, StoreLocation.LocalMachine); keystore.Open(OpenFlags.ReadOnly); X509CertificateCollection certs = keystore.Certificates.Find(X509FindType.FindByThumbprint, "19 27 d4 55 b3 j7 55 d1 78 a2 63 99 5g 25 gg 65 t5 t5 05 8c", false); if (certs.Count > 0) { return " found cert on local root "; }
I have change StoreName to my no luck
anyone to help