none
Bad SSL Cert for RoadOnDemand and AerialWithLabelsOnDemand RRS feed

  • Question

  • If you try and access the tile URL for the RoadOnDemand and AerialWithLabelsOnDemand map type, you get a url like this:

    http://ak.dynamic.t2.tiles.virtualearth.net/comp/ch/10?mkt=en-US&it=A,G,L&og=422&n=z

    If you change it to use HTTPS, you get certificate warnings (tested with Edge, Firefox, Chrome, iOS Safari and on different machines on different networks in different parts of the US).

    https://ak.dynamic.t2.tiles.virtualearth.net/comp/ch/10?mkt=en-US&it=A,G,L&og=422&n=z

    "Websites prove their identity via certificates. Firefox does not trust this site because it uses a certificate that is not valid for ak.dynamic.t2.tiles.virtualearth.net. The certificate is only valid for the following names: a248.e.akamai.net, *.akamaihd.net, *.akamaized-staging.net, *.akamaihd-staging.net, *.akamaized.net Error code: SSL_ERROR_BAD_CERT_DOMAIN"

    If you put in a valid api key, you get a response like this to the metadata endpoint which contains the url template for the above url.

    https://dev.virtualearth.net/REST/v1/Imagery/Metadata/AerialWithLabelsOnDemand?key={YOUR KEY HERE}
    {"authenticationResultCode":"ValidCredentials","brandLogoUri":"http:\/\/dev.virtualearth.net\/Branding\/logo_powered_by.png","copyright":"Copyright © 2019 Microsoft and its suppliers. All rights reserved. This API cannot be accessed and the content and any results may not be used, reproduced or transmitted in any manner without express written permission from Microsoft Corporation.","resourceSets":[{"estimatedTotal":1,"resources":[{"__type":"ImageryMetadata:http:\/\/schemas.microsoft.com\/search\/local\/ws\/rest\/v1","imageHeight":256,"imageUrl":"http:\/\/ak.dynamic.{subdomain}.tiles.virtualearth.net\/comp\/ch\/{quadkey}?mkt=en-US&it=A,G,L&og=422&n=z","imageUrlSubdomains":["t0","t1","t2","t3"],"imageWidth":256,"imageryProviders":null,"vintageEnd":null,"vintageStart":null,"zoomMax":21,"zoomMin":1}]}],"statusCode":200,"statusDescription":"OK","traceId":"82cc3b2f909549c29f1c564b56d2a87e|CH1AECCD03|7.7.0.0"}

    Tuesday, June 4, 2019 9:25 PM

All replies

  • I just realized I wasn't sending urlScheme=https in the query parameter, but it's still worth noting that this URL doesn't work as HTTPS.
    Tuesday, June 4, 2019 10:40 PM
  • That's not the right URI. If you put the parameter uriScheme=https (not urlScheme) into the query you'll get back https:\\{subdomain}.ssl.ak.dynamic.tiles.virtualearth.net which is the right one to use for https. (note the ssl.sk)
    Wednesday, June 5, 2019 4:08 PM
    Moderator