locked
Connect to HTTPS url from Windows Store aplication RRS feed

  • Question


  • I'm trying to connect to a https web api url from my windows store 8.1 . Im getting this error "the host name in the certificate is invalid or does not match". I need some help on configuring the windows store 8.1 to https service/site. I got certificate from my company and i configured my web api to use this company certificate.When i try to access the web api from browser is giving error " Certificate Error-Mismatched Address". i can skip in browser get executes perfectly  when i work from windows store ,it gives error, I need some help to resolve this error and also configuring my application to access to https url in webapi


    Mahender

    Wednesday, April 2, 2014 9:38 PM

Answers

  • If you are getting an error even in a web browser which says that there is an address mismatch, then it means you are trying to browse to https://a.com, and the server certificate that gets returned indicates that the certificate is issued to "b.com". Since the name does not match, you see the error.

    Ignoring server certificate errors are really not advised from a Windows Store app (or anywhere for that matter). Before suggesting solutions, I want to know:

    1.) Why are you using a different URL that gives you a certificate for a different domain?

    2.) Are you trying to browse to the site via IP Address or by a friendly name (www.abcd.com)?

    3.) What class are you using to send your HTTPS request?


    Windows Store Developer Solutions, follow us on Twitter: @WSDevSol|| Want more solutions? See our blog


    Thursday, April 3, 2014 12:28 AM
    Moderator