aspaceworm
New Pleskian
- Server operating system version
- latest
- Plesk version and microupdate number
- latest
I am subbed to shared Windows hosting on HostGator and need to get my site's certificate in my web app. I am trying to do it with the following code, but getting an error that no certs can be found:
To dig deeper, I wrote code to log all certificates in all stores to a file. There are a few Let's Encrypt certificates in there, but none have the thumbprint or name of my certificate. I've verified in browser that my certificate is the one being used. Any help here would be appreciated, thanks!
var x509Store = new X509Store(StoreLocation.CurrentUser);
x509Store.Open(OpenFlags.ReadOnly);
var x509Certificate = x509Store.Certificates
.Find(
X509FindType.FindByThumbprint,
builder.Configuration["Config:AzureADCertThumbprint"],
validOnly: false)
.OfType<X509Certificate2>()
.Single();
x509Store.Close();
To dig deeper, I wrote code to log all certificates in all stores to a file. There are a few Let's Encrypt certificates in there, but none have the thumbprint or name of my certificate. I've verified in browser that my certificate is the one being used. Any help here would be appreciated, thanks!