This project is read-only.

DeepEarth & SSL

Oct 21, 2009 at 11:19 PM

Has anyone successfully gotten DeepEarth to pull map image data via SSL?

For some reason when I change my Virtual Earth endpoints in servicereferences.clientconfig from http:// to, the map will be displayed, but if I run Web Developer Helper I can see that it's pulling the images from the tile servers using http (not https).

Also, when I access the site using http://sitename/default.aspx (non-secure) I can see the maps but if I access the site using https://sitename/default.aspx (secure) it throws an error.  Yes, I have a valid clientaccesspolicy.xml file in the root of my website.

I've been looking at this for days now and I suspect it's a configuration problem.  Any help would be GREATLY appreciated.



Oct 22, 2009 at 5:56 PM

I think I have finally found the solution to this issue but am having trouble implementing it in the DeepEarth code.

Basically, when initializing the tile source, I need to set the UriScheme to Https (it is Http by default).  This tells the ImageryService to return tile images in the form of https://...jpg instead of http://...jpg. 

I've tried implementing this in the InitVeService() method of VeTileSource.cs but it is now throwing an error when I try to load the application.  Below is the method that I modified - have I done something wrong?

private void InitVeService()
// Test if isDesignTime to display in Blend if (HtmlPage.IsEnabled && !_IsInitializing)
_IsInitializing = true;
ISOKey = _MapMode + ISOKey;
//get token Token.GetToken((o, e) => { token = ((TokenResultArgs)e).Result; //get tilePathInfo from ISO if already there. tilePathInfo = IsolatedStorage.LoadData<TilePathInfo>(ISOKey); if (tilePathInfo == null)
var mapUriRequest = new ImageryMetadataRequest
Credentials = new Credentials { Token = token },
Style = GetVEMapStyle(_MapMode)
, Options = new ImageryMetadataOptions { UriScheme = UriScheme.Https }

var imageryService = new ImageryServiceClient();
imageryService.GetImageryMetadataCompleted += (oimageryService, eimageryService) =>
tilePathInfo = new TilePathInfo
TilePath = eimageryService.Result.Results[0].ImageUri,
SubDomains = eimageryService.Result.Results[0].ImageUriSubdomains
//Store in ISO for next visits IsolatedStorage.SaveData(tilePathInfo, ISOKey); onInitialized(); }; imageryService.GetImageryMetadataAsync(mapUriRequest); }else { onInitialized(); } }); } }