I am trying to load a cert follwing this article, from my windows app server (S1 plan).
I have uploade a known cert to my app service certificate store using the "Bring you own certification (.pfx)" option.
I've added the appsetting WEBSITE_LOAD_CERTIFICATE, with a value of *. This should allow all cert to be accessible.
I use the code in the article, which includes this line:
X509Certificate2Collection certCollection = certStore.Certificates.Find(
X509FindType.FindByThumbprint,
certThumbprint,
validOnly);
It cannot find the cert.
I am sure the thumbprint is correct. However, as a test I checked how many certificates are in the store and it's zero. To do this, I used:
certStore.Certificates.Count()
This post says the certificate will never be available, because they are not on the same server. It references another post, which suggest using the approach in this older article, but it's the same approach as above..
Update:
I see the cert in the portal UI.
No certs are found when I use the kudu console to run:
get-childitem -path cert:\CurrentUser\My -Recurse
From my box, I run the PowerShell command Get-AzWebAppCertificate, and it finds the cert.
Also, under configuration "Client certificate mode" was set to ignore by default. I changed it to Require, but that didn't help.