Select to view content in your preferred language

Default legend widget does not work over https in IE

10011
36
05-17-2012 05:38 AM
BenSayers
Emerging Contributor
When using the default ESRI widget the legend symbology do not show up when using Internet Explorer (IE). They show fine in Chrome, Safari and Firefox, but when using IE this all that is displayed is the browser standard red x's.

I have seen others having the same trouble in various different posts and some people have suggested various fixes for previous versions of the API, but none work for me. I am using AGS 10.04 and JS API v2.8.

Has anyone fixed this exact problem? Anyone at ESRI looked in to this?

Any help/suggestions will be greatly appreciated.

In anticipation, Ben.
0 Kudos
36 Replies
derekswingley1
Deactivated User
Is your entire site running over https? Your html, css and js, as well as your ArcGIS Server services, need to be served using https.

Here's a simple page that uses the legend dijit, version 2.8 of the API and https:  http://servicesbeta.esri.com/demos/https/legend-using-https-2.8.html It works without issue in IE.
0 Kudos
BenSayers
Emerging Contributor
Is your entire site running over https? Your html, css and js, as well as your ArcGIS Server services, need to be served using https.

Here's a simple page that uses the legend dijit, version 2.8 of the API and https:  http://servicesbeta.esri.com/demos/https/legend-using-https-2.8.html It works without issue in IE.


Derek,
Thank you for looking in to this for me.
Firstly, yes all of my site is using https

I viewed the source of your page and looked at your code and this line I do not have and have never seen anywhere:
esri.dijit.Legend.prototype._legendUrl = 'https://www.arcgis.com/sharing/tools/legend'

I tried substituting your code for the code I was using and I swapped your url above to mine (https://www.efafrica.com/rest/services/EFAv3/EFA_Mainv3/MapServer/legend
) and it still doesn't work in IE. It works fine in Chrome though.

Have you attempted to reproduce the legend widget example not using arcgis.com but from a rest service running form ArcGIS Server?
0 Kudos
derekswingley1
Deactivated User
Sorry about that, the line tweaking the legend dijit's prototype shouldn't have been in there. The link I posted previously no longer uses arcgis.com for the legend. Can you confirm it works in IE?

Can you post a screen shot of what you're seeing in IE?
0 Kudos
BenSayers
Emerging Contributor
Sorry about that, the line tweaking the legend dijit's prototype shouldn't have been in there. The link I posted previously no longer uses arcgis.com for the legend. Can you confirm it works in IE?

Can you post a screen shot of what you're seeing in IE?


Derek,
Your example works in IE. I think it must be something to do with the Token Service I am using and the proxy page not passing the legend icons correctly.

Here is a screen shot of what I am getting in IE:
[ATTACH=CONFIG]14397[/ATTACH]
Though in Chrome I get:
[ATTACH=CONFIG]14398[/ATTACH]


Would you be able to produce a mash up of the two samples:
https://servicesbeta.esri.com/demos/widget/widget_identitymanager_client_side.html
http://help.arcgis.com/en/webapi/javascript/arcgis/demos/widget/widget_legendvisible.html

As this is the basis of my site.

Many thanks for your help.
Ben
0 Kudos
derekswingley1
Deactivated User
0 Kudos
BenSayers
Emerging Contributor
How's this look:  https://servicesbeta.esri.com/demos/https/legend_id_manager_https.html


That works perfectly. I've had a look at the code and it all seems to be straightforward, did you have to do anything special to the proxy page? Would I be able to take a look at the proxy page? I am using a .jsp proxy do you think that could be my problem?

Many thanks for you continued efforts,
Ben
0 Kudos
derekswingley1
Deactivated User
Nothing special in the code or the proxy page.

One thing to explore�?? where possible, we use base64 encoded strings for images to reduce the number of https requests. This doesn't work in IE. For IE, we need to use the actual image file. Can you confirm that these are accessible from your service? Here's an example from the point layer used in the example I posted previously:  https://servicesbeta.esri.com/ArcGIS/rest/services/SanJuan/TrailConditions/FeatureServer/0/images/D9...

You should be able to use fiddler to see the requests for the images that are needed for the legend.
0 Kudos
BenSayers
Emerging Contributor
It appears that I am using Base64, as the requests for my images in Internet Explorer look like: https://www.efafrica.com/rest/services/EFAv3/EFA_Mainv3/MapServer/1/images/3b55578f
How do I force the actual image request rather that the Base64?
Your service works fine in my Internet Explorer though?
Coincidentally, once I have right-clicked on the red x image and copied the image URL then logged in through the ArcGIS Server REST API Login screen that one image appears in the legend but none of the others, would you expect this to happen?
[ATTACH=CONFIG]14415[/ATTACH]
I feel we are getting a little closer to solving the problem,
Thank you Derek.
0 Kudos
JeffPace
MVP Alum
Just to pile on, i can replicate this as well.  On my secure service (entire app is secure, so layers are not), the legend shows red x's in IE only

The non base64 encoding is definitely the difference.

The source path to the image in the legend is not getting the token appended on it

If i sniff the token using fiddler, and then append the ?token=LqGIFsRUz8nkeM3XKjYT4W1U0xfLvBT7cEkYZcT3jZU. to the end of the image request in IE for the legend the legend item appears.
0 Kudos