I integrate my application with Xero, which requires two certificates. I uploaded them to Azure using this article, but I still cannot connect to the Xero API . I hope someone has experience integrating the Xero Partner app with the Azure web app.
I downloaded two pfx files; one is a self-signed certificate and the other is a partner certificate issued by Xero. The last pfx file contains two certificates; Entrust Commercial Private Sub CA1 (whatever the means) and a unique Entrust Identity Certificate for my application.
I use the following code to download certificates by their unique fingerprint:
static X509Certificate2 GetCertificateFromStore(string thumbprint) { var store = new X509Store(StoreLocation.CurrentUser); try { thumbprint = Regex.Replace(thumbprint, @"[^\da-zA-z]", string.Empty).ToUpper(); store.Open(OpenFlags.ReadOnly); var certCollection = store.Certificates; var currentCerts = certCollection.Find(X509FindType.FindByTimeValid, DateTime.Now, false); var signingCert = currentCerts.Find(X509FindType.FindByThumbprint, thumbprint, false); if (signingCert.Count == 0) { throw new Exception($"Could not find Xero SSL certificate. cert_name={thumbprint}"); } return signingCert[0]; } finally { store.Close(); } }
This works fine locally, but on my azure website I get 403.7 error:
The page you are attempting to access requires your browser to have a Secure Sockets Layer (SSL) client certificate that the Web server recognizes.
I also reviewed the following links to try to solve the problem:
What I have not tried yet:
- Convert my web application to a cloud service; trying to avoid this, however I'm not sure what steps are involved.
- Using a virtual machine; I have not found any detailed steps on how to do this, but it looks better than the above.
Error Screenshot: 
tqrecords
source share