I am trying to connect to the Windows Azure Service Management API. I must provide a certificate that I previously uploaded to my azure portal. In .NET, this is very simple, as described in detail here . However, in Metro, you cannot manually attach a certificate to a request. On the Microsoft forum, I found this:
HttpClientHandler aHandler = new HttpClientHandler(); aHandler.ClientCertificateOptions = ClientCertificateOption.Automatic; HttpClient aClient = new HttpClient(aHandler); HttpResponseMessage aResp = await aClient.GetAsync("https://[azure service management uri]");
Together with giving applications the ability to use common certificates, this should select a certificate or provide the user with the opportunity to choose a certificate. The certificate is in my personal store, and I even tried to include the certificate in the package manifest, but nothing works. Looks like it just does not include the certificate in the request.
What is the correct way to call a REST-based API that needs a certificate in a Metro application?
source share