Select to view content in your preferred language

silverlight and http https cross-scheme calls

660
2
10-14-2010 05:45 AM
MichaelBlom
Deactivated User
Hi there,

This one's a doozy:

We have a Silverlight mapping app that we�??re trying to deploy on a web server as an external facing website secured with https.

Our ArcGIS server box is also set to use https scheme, and we make also calls to ArcGIS services to use the tiles via the https site.

The problem arises with our legend, and the custom GetLegend service we�??ve built.  This service uses the soap api�??s getlegendinfo functionality to return json.  One of the json properties is the url to where the images for the layers are stored.

This is the call to our getlegend service, which passes the soap url as a parameter:

https://OURARCGISSERVER/services.esri.rest/services/Mapservice.svc/GetLegend?mapServiceUrl=https://O...

this is a sample of the Json returned:

[{"LayerId":0,"LayerName":"best objective track points","Legend":[{"Label":"Forecasted","Url":"http:\/\/OURARCGISSERVER \/arcgisoutput\/_ags_leg6e267d44bf7e474ba4c458f2fb3fc411.jpg"}.......

When the user opens the legend in our Silverlight app, they don�??t see the  legend images because the call to the image is http, and Silverlight doesn�??t allow cross-scheme (http-https) calls involving images.  They do see text based labels and titles such as �??Forecasted�?� because cross-scheme calls will happily pass through text.

The question is, how can we set things up so our images show up in our legend?  The call needs to be https to https for images to come through. 
Where in the config files do we set it so that our getlegendinfo will return a url that points to https and also uses the DNS (externally visible) name of our ArcGIS server box?

Thanks very much, I know this is a tough one.
Mike
0 Kudos
2 Replies
LanceCrumbliss
Frequent Contributor
Hi there,

Did you ever find a solution to this?  Discouraging that no one from ESRI has replied.

Lance
0 Kudos
DominiqueBroux
Esri Frequent Contributor
I probably missed something but if you wrote your own legend service, why this service is not returning
[{"LayerId":0,"LayerName":"best objective track points","Legend":[{"Label":"Forecasted","Url":"https:\/\/OURARCGISSERVER \/arcgisoutput\/_ags_leg6e267d44bf7e474ba4c458f2fb3fc411.jpg"}.... ...

instead of
[{"LayerId":0,"LayerName":"best objective track points","Legend":[{"Label":"Forecasted","Url":"http:\/\/OURARCGISSERVER \/arcgisoutput\/_ags_leg6e267d44bf7e474ba4c458f2fb3fc411.jpg"}.... ...

If you are using the arcgis.com legend service, you can add the parameter 'returnbytes=true', so the image will be returned as imageData instead of an URL.
Example : http://www.arcgis.com/sharing/tools/legend?soapUrl=http://sampleserver1.arcgisonline.com/ArcGIS/rest...

Then there is no more cross scheme issue.
0 Kudos