Select to view content in your preferred language

esri.config.defaults.io.proxyUrl produces repeating querystring

856
2
02-28-2012 04:57 AM
MapEnglish
Frequent Contributor
I have an JavaScript API application based on the "Create WebMap from ID" sample. One of the webmap layers points to a web-accessible csv file; the request for said file when the app loads requires a proxy page. However, the app seems to emit the following request, which you can see produces "proxy.ashx?" twice:

'http://apps.esri.ca/csv/proxy.ashx?proxy.ashx?http://apps.esri.ca/data/niagaratrafficcameras.csv'

The app can be checked out at:
http://apps.esri.ca/csv/index1.html

Any insight as to why this request gets formed like this would be greatly appreciated.

Thanks,
Matt English
Esri Canada
0 Kudos
2 Replies
derekswingley1
Deactivated User
Hi Matt,

This a bug that only happens when using a webmap with a CSV layer and specifying the URL for your proxy without a domain. We found this a few weeks back and there is a fix in the next release of the API (due out around dev summit time).

It looks like you might have already found this as you have the full URL to your proxy commented out:
var proxyUrl = "proxy.ashx"; // "http://apps.esri.ca/proxy/proxy.ashx";// 


Does your app work if you specify the full URL to the proxy? I know this makes your app a bit more brittle (one more thing to change when moving dev to staging to prod) but it's the easiest way to make this work at 2.7.
0 Kudos
MapEnglish
Frequent Contributor
The full url to the proxy does work.

Many thanks, Matt
0 Kudos