Requests not always using the Proxy Url

578
4
11-07-2012 08:49 AM
AD
by
New Contributor
I have a map viewer that has the following settings-

esri.config.defaults.io.proxyUrl = "/proxy.ashx";
esri.config.defaults.io.alwaysUseProxy = true;

But when I look at the network trace in IE, some URLs are using the proxy and some aren't.  What would be causing this?

For example I see:

https://localhost/proxy.ashx?https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/Ma...
https://localhost/proxy.ashx?https://[server name]/ArcGIS/rest/services/Org/Basemap/MapServer/legend?f=json&callback=dojo.io.script.jsonp_dojoIoScript6._jsonpCallback

then later I see

https://[server name]/ArcGIS/rest/services/Org/Basemap/MapServer/4/images/714F5E24
0 Kudos
4 Replies
AdrianMarsden
Occasional Contributor III
Sorry, can't help, but I've noticed something similar today.

I'm using this TOC http://www.arcgis.com/home/item.html?id=9b6280a6bfb0430f8d1ebc969276b109 and in IE and Firefox the graphics for the legend do not go via proxy page, so miss the token, and do not appear (I've tweaked the code now to add the token) in chrome, however, the source of the image looks like this

src="data:image/png;base64,iVBORw0KG..<loads more like this>"

and it works without the token, where as in IE it is a proper path to the image (like your example src="https://[server name]/ArcGIS/rest/services/Org/Basemap/MapServer/4/images/714F5E24").

What's going on here then?
0 Kudos
JeffJacobson
Occasional Contributor III
...in chrome, however, the source of the image looks like this

src="data:image/png;base64,iVBORw0KG..<loads more like this>"

and it works without the token, where as in IE it is a proper path to the image (like your example src="https://[server name]/ArcGIS/rest/services/Org/Basemap/MapServer/4/images/714F5E24").

What's going on here then?


Which version of IE are you using?  Since older versions of IE do not support the Data URI scheme, it may be the case that the JS API is determining the URL format based on your browser.
0 Kudos
AdrianMarsden
Occasional Contributor III
IE8 & 9 but reading the Wiki entry (you learn something every day, thanks) even 9 seems not to fully support this.

Anyway, not to hijack the thread, the real question is why do these requests not go very the proxy page and get a token added?

Cheers

ACM
0 Kudos
AD
by
New Contributor
I did narrow it down to the TOC and legend features.  If I commented those out, then the "invalid" URLs go away.

I am using IE 9 for this troubleshooting.

I found this thread that seems to be similar, but I don't like the answers included.  It sounds like an issue with the JS API that should be addressed.

http://forums.arcgis.com/threads/42803-Legend-Dijit-Problem-in-Internet-Explorer-(IE)
0 Kudos