Use with SSL

Dec 31, 2008 at 9:52 PM
Thanks for all of your work
My project works great when working from HTTP. When I try to use it from HTTPS all of my application works except the map never displays. I get the following error twice:
Code: 4001 Category: ImageError
Message: 4001 An error has occured

I watched what was happening from Fiddler and I get three calls to the VE web service and then nothing after that. When It runs normally from HTTP I get a flurry of calls for the images after the three calls. Everything I have read states that Silverlight can call to HTTPS web services when originating from HTTP but can it call to HTTP web services when originating from HTTPS? I have called my own WCF services using both methods with no problem. I tried to change the endpoint address to the VE web service to access it via HTTPS and that did not work either. I have spent a whole day on this so I thought I would ask the experts. This is the last obstacle in my way before recommending this as a good solution for our project going forward. PLEASE HELP!
Jan 1, 2009 at 11:25 PM
Edited Jan 1, 2009 at 11:26 PM
I think I have figured out what the problem is. Microsoft's documentation states that cross scheme works for web service calls but not for imang retrieval (image src) the HTTPS call to VE is working as validated by Fiddler but the image URIs are retured as HTTP and thus not working. I am going to dig into the framework and attempt to determin what the scheme is and adjust the image URI scheme accordingly.
Again thanks for the great job on this project!
Jan 8, 2009 at 3:49 AM
Continuing the conversation with myself, I discovered the option to have the image URLs returned as HTTPS and modified the VE Tilelayer class however, the images still don't load. Upon inspection with Fiddler SL is attempting a connection over and over and.... I finally closed the browser to stop the connection attempts at 1000. I believe that what is happening is that the server is returning a certificate error and SL does not know how to deal with it. I captured one of the URLs and tried it manually and got the certificate error. The bottom line is I can't figure out how to use the framework with SSL. If anyone figures it out please post the answer here. Thanks!
Jan 8, 2009 at 8:35 PM
I found a way to get this to work but it is not optimal. I intercepted the URL in the GetTile method of the TileLayer class(es) and modified it to call my own proxy ASHX file:

url = "myASHX_Handler.ashx?a=" + HttpUtility.UrlEncode(url);
return new Uri(url);

then on my server I simply call that URL and return the image back to SL.
Now all calls for tiles are routed through my server. This is not the best approach but it keeps me moving forward for now.

Again, if someone has a better solution please respond. I will be glad to show anyone my clunky hack if you want.

The fact that it works on my server proves that it is not a certificate error problem. I really don't know why the MultiScaleImage control is not handeling the HTTPS URL.