locked
Using an HTTP client certificate in Windows 8 metro application. RRS feed

  • Question

  • How to I specify a ClientCertificate in a C# Metro app.

    There are a few questions regarding this but no clear answer.

    I would like to make an HTTP REST call to Windows Azure management API.

    To do that I must add a client certificate to the HTTP.

    I would normally do so by adding the certificate to the HTTP Request, however, it looks like it is not supported by Metro.

    Is there a way of doing that?

    Thanks,

    Doron.

    Saturday, March 17, 2012 10:05 PM

Answers

  • Doron - I've received word from the development team that the Consumer Preview is lacking in the ability to send a client certificate to a remote web server.  We will have to wait for RC to see how this progresses.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator

    Monday, April 2, 2012 1:31 PM
    Moderator

All replies

  • Yes, this is supported.  I am expecting a sample for Client Certificates from our networking team this week and will post it when I have it.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator

    Monday, March 19, 2012 1:58 PM
    Moderator
  • Hi Matt,

    Any news?

    I don't need a complete sample, a few lines of codes would be enough.

    Thanks,

    Doron.

    Friday, March 23, 2012 12:15 PM
  • This might get you through: 

    http://msdn.microsoft.com/en-us/library/windows/apps/1B3AE6B5-F8F9-442A-9E09-FD656EAB7DB1

    I've inquiring about the sample that was promised.


    Matt Small - Microsoft Escalation Engineer - Forum Moderator

    Friday, March 23, 2012 1:33 PM
    Moderator
  • Hi Matt,

    I reviewed the sample in the link you sent.

    It is not really the same situation and doesn't solve my problem of passing a client certificate to the Windows Azure management API.

    The sample deals with performing custom certification on the server side, but unfortunately, I don't control the server here which is the Windows Azure API.

     Thanks,

    Doron.

    Saturday, March 24, 2012 12:26 PM
  • Hi Doron - I'm still waiting for the sample.  I'll check with some others to see if there's any snippets of code that I can pass on to you.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator

    Monday, March 26, 2012 1:39 PM
    Moderator
  • Thanks,

    I appreciate it.

    Doron.

    Monday, March 26, 2012 1:44 PM
  • Doron - I've received word from the development team that the Consumer Preview is lacking in the ability to send a client certificate to a remote web server.  We will have to wait for RC to see how this progresses.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator

    Monday, April 2, 2012 1:31 PM
    Moderator
  • How can I automaticaly accept a SSL certificate in WinRT has I was doing in .NET ?

    static ClientProxyHelper()
    {
         ServicePointManager.ServerCertificateValidationCallback += AcceptAnyCertificate;
    }

    privatestaticbool AcceptAnyCertificate(object sender, X509Certificate cert, X509Chain chain, SslPolicyErrors error)
    {
    returntrue;
    }

        
    Tuesday, May 8, 2012 2:59 PM
  • Hi Matt,

    Now that release preview is out, would it be possible to get the sample app you are talking about?

    Thank you,

    Chris

    Friday, June 29, 2012 11:59 PM
  • Yes, any updates on this? The app I'm working on requires a client certificate. Apparently this example of .NET 4.5 HttpClient code isn't supported in Metro, which makes our web interaction largely impossible.
    Friday, July 20, 2012 6:32 PM
  • Hi where you able to find a solution?

    trying to do the same thing.

    Cheers

    Wednesday, September 26, 2012 9:02 AM
  • Same here, how to proceed in such cases. Any links or a small sample?
    • Edited by Purab Thursday, May 16, 2013 7:40 PM typo
    Thursday, May 16, 2013 7:40 PM