Select to view content in your preferred language

Access-Control-Allow-Origin and 3.0

5632
4
06-19-2012 08:19 PM
JohnCartwright
Deactivated User
Hello All,

I'm finding that when using 3.0, I get the following error:

XMLHttpRequest cannot load http://server.arcgisonline.com/ArcGIS/rest/info?f=json. Origin http://localhost is not allowed by Access-Control-Allow-Origin.

Simply switching the API back to 2.8 eliminates the problem.  I've tried configuring both CORS and the proxyUrl, but neither helps.

Can someone please provide me some guidance here?

Thanks!

--john
0 Kudos
4 Replies
derekswingley1
Deactivated User
Hi John,

You can safely ignore these errors. There's info about this in the doc for esri.request (specifically, the bullet for 3.0).

Kelly also posted about this a couple of days ago:  http://forums.arcgis.com/threads/59988-Issue-Upgrading-to-version-3.0?p=207055&viewfull=1#post207055
0 Kudos
JohnCartwright
Deactivated User
Thanks Derek, I had not seen Kelly's message on this topic.  I'm surprised though that http://enable-cors.org/ reports that sservices.arcgisonline.com is a CORS-enabled site.

--john
0 Kudos
derekswingley1
Deactivated User
Glad to help.

Attached is what I see when I used enable-cors.org to check if CORS is supported on services.arcgisonline.com. That server is not set up for CORS.
0 Kudos
AaronConnolly
Regular Contributor
Ignoring this warning doesn't work if you call a buffer task:

http://forums.arcgis.com/threads/78905-GeometryServic-Buffer-Task-amp-Access-Control-Allow-Origin?p=...

Why would this happen with a geometry service? I'm running API version 3.2.
0 Kudos