XMLHttpRequest cannot load error with v3.2 samples

1243
2
Jump to solution
10-28-2012 09:39 AM
JoshuaDell
New Contributor II
I have been working on migrating from v2.8 to v3.2; among other complications, the "XMLHttpRequest cannot load..." error error shown below is being thrown.  This error also appears to be thrown when browsing to all of the live samples for the ArcGIS Javascript API v3.2 located at http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples_start.htm.  Any ideas how to work around this error being thrown?

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

Thanks,
Josh
0 Kudos
1 Solution

Accepted Solutions
JoshuaDell
New Contributor II
Thanks for the link, specifically the reply shown below was helpful. I don't usually like to ignore errors, but I'll just ignore this one and move on.   

This error can be ignored - here's a blurb from the help on this error:


Automatic detection of CORS support. This is done by attempting to access the /<instance-name>/rest/info endpoint of any ArcGIS server instance used in an ArcGIS API for JavaScript application. For servers that do not support CORS, this request will fail and an error will be logged to the browser's developer console. This can be observed in most of the API's samples as the majority of the servers used do not support CORS. This error can safely be ignored. There are cases where the API will not send a request to /<instance-name>/rest/info and are as follows:
The browser does not support CORS
The Server is already listed in esri.config.defaults.io.corsEnabledServers
esri.config.defaults.io.corsDetection is false
JSON is used instead of JSONP in the following cases:
The resource being fetched is on the same domain as the application
The resource being fetched is on a server that supports CORS

To read the blurb in context see the API reference for esri.request
http://help.arcgis.com/en/webapi/jav...space_esri.htm

View solution in original post

0 Kudos
2 Replies
DavideLimosani
Occasional Contributor II
I have been working on migrating from v2.8 to v3.2; among other complications, the "XMLHttpRequest cannot load..." error error shown below is being thrown.  This error also appears to be thrown when browsing to all of the live samples for the ArcGIS Javascript API v3.2 located at http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples_start.htm.  Any ideas how to work around this error being thrown?

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

Thanks,
Josh


Hi Josh,

read this:
http://forums.arcgis.com/threads/60386-Access-Control-Allow-Origin-and-3.0?p=208466&viewfull=1#post2...

Davide
0 Kudos
JoshuaDell
New Contributor II
Thanks for the link, specifically the reply shown below was helpful. I don't usually like to ignore errors, but I'll just ignore this one and move on.   

This error can be ignored - here's a blurb from the help on this error:


Automatic detection of CORS support. This is done by attempting to access the /<instance-name>/rest/info endpoint of any ArcGIS server instance used in an ArcGIS API for JavaScript application. For servers that do not support CORS, this request will fail and an error will be logged to the browser's developer console. This can be observed in most of the API's samples as the majority of the servers used do not support CORS. This error can safely be ignored. There are cases where the API will not send a request to /<instance-name>/rest/info and are as follows:
The browser does not support CORS
The Server is already listed in esri.config.defaults.io.corsEnabledServers
esri.config.defaults.io.corsDetection is false
JSON is used instead of JSONP in the following cases:
The resource being fetched is on the same domain as the application
The resource being fetched is on a server that supports CORS

To read the blurb in context see the API reference for esri.request
http://help.arcgis.com/en/webapi/jav...space_esri.htm
0 Kudos