March 15, 2024
Recently I was updating an old .NET Core web application to .NET 8 and the code was reading a certificate as follows. private X509Certificate2 GetCertificateByThumbprint(string thumbprint){ X509Store store = new (StoreName.My, StoreLocation.CurrentUser); store.Open(OpenFlags.ReadOnly);