I deployed the web application as a web application in Azure App Service. I have uploaded several certificates to Azure Portal since the web application is running over SSL and we are using a different certificate to perform some decryption.
In the latter case, I have a method (which works fine locally) to find the certificate:
public static X509Certificate2 FindCertificate(KnownCertificate certificate) { return FindCertificate(StoreName.My, StoreLocation.CurrentUser, X509FindType.FindByThumbprint, certificate.Thumbprint); }
But I get an error that the certificate with the XYZ fingerprint was not found. Although, he is present on the Cote d'Azur. (I downloaded and imported it)
I am using StoreLocation.CurrentUser as suggested in THIS POST , but it still does not work. Am I using the wrong store or what else am I missing?
EDIT: I was able to remotely debug my WebApp using the ImmediateWindow VisualStudio function as well. I executed this code
new X509Store(StoreName.CertificateAuthority, StoreLocation.CurrentUser).Certificates.Find(findType, findValue, false).Count;
testing all possible combinations of StoreNames and StoreLocations, but to no avail.
Is it possible, as indicated here , that in order to use the certificate for purposes other than https traffic, you need a cloud service and that (I believe) the App services do not support it?
source share