<link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.0/js/dojo/dijit/themes/claro/claro.css"> <script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=3.0"></script>
Solved! Go to Solution.
Hi all,
I guess the main problem is that this new requirement (to use a web server) isn't documented anywhere. Eg, the Samples homepage still links to a video showing how to download a sample and run it from your local disk. None of the individual samples have been updated to list the requirement for a web server.
The video shows using a local instance of IIS to run the sample. Notice that the html file is placed in the wwwroot directory (default location to serve files using IIS) and when it's loaded in the browser, the sample is accessed using http://, not file://.
If I'm running an app from the IIS root folder and I am still getting the following console error:
XMLHttpRequest cannot load http://server.arcgisonline.com/ArcGIS/rest/info?f=json. Origin http://<servername> is not allowed by Access-Control-Allow-Origin.
Should I be concerned? What could be causing this?
Please help me. The live samples are working when i view it in the browser, but when i copy the code into notepad and run it as a local copy in the browser. The code is not working, nothing is being displayed.