SSL Support for Virtual Earth is here

If you've ever placed a Virtual Earth map or Google map on an HTTPS page then you're probably familiar with the mixed content message that appears when the page loads:

While there are workarounds for this in the browser settings, the solution isn't really scalable. The good news it that Virtual Earth 6 now offers support for SSL pages. All that we have to do is update the script reference like so:

<script type="text/javascript" 
  src="https://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6&s=1">
</script> 

Notice how the source path now begins with https and the version is set to 6. Also, there is the additional parameter at the end, s=1; that flags the request accordingly.

If you're using ASP.NET AJAX and have a ScriptManager on the page, then your reference can look something like this:

<asp:ScriptManager ID="ScriptManager1" runat="server">
  <Scripts>
    <asp:ScriptReference Path="https://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6&s=1" />
  </Scripts>
</asp:ScriptManager>

This seems like a subtle change, but both Google and Virtual Earth have lacked this type of support for years. For anyone building enterprise applications that require HTTPS, this is something we've been asking and waiting for, for quite some time.

Published Friday, November 23, 2007 12:34 PM by davidbarkol
Filed under: ,

Comments

# re: SSL Support for Virtual Earth is here

Saturday, November 24, 2007 7:16 AM by Garbin

And I've been waiting for it too. Thanks for the info!

# Microsoft&#8217;s SSL for Secure Map Mashups

Thursday, December 27, 2007 11:53 PM by Microsoft’s SSL for Secure Map Mashups

Pingback from  Microsoft&#8217;s SSL for Secure Map Mashups

# Virtual Earth SSL/HTTPS Support for Secure applications. More Dev news - Interfacing with wii remote | geo2web.com

Pingback from  Virtual Earth SSL/HTTPS Support for Secure applications. More Dev news - Interfacing with wii remote | geo2web.com

# re: SSL Support for Virtual Earth is here

Thursday, July 31, 2008 6:18 PM by Yozepi

This is great news except I'm not getting any data back from the secure url. Any suggestions?

Leave a Comment

(required) 
(required) 
(optional)
(required)