<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: CORS error - not the normal sort in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-error-not-the-normal-sort/m-p/295860#M27167</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using Server Manager, in IIS, you can navigate to the site and under the HTTP Response Headers you can choose ADD, then title &lt;SPAN style="color: #dd1144; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 12px; background-color: #f7f7f9;"&gt;Access-Control-Allow-Origin and value is the IP or domain of the site you want to allow. Could always choose * for everyone.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #dd1144; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 12px; background-color: #f7f7f9;"&gt;While you can do it in your code, Server side is probably the best option.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 17 Nov 2014 15:42:40 GMT</pubDate>
    <dc:creator>PaulCrickard1</dc:creator>
    <dc:date>2014-11-17T15:42:40Z</dc:date>
    <item>
      <title>CORS error - not the normal sort</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-error-not-the-normal-sort/m-p/295851#M27158</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This Cross Origin thingy, AKA CORS has been discussed many time, however I have read those threads and none covers exactly what I am seeing.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am only seeing this issue when I make a request for a legend.&amp;nbsp; The error doesn't always happen.&amp;nbsp; At 3.5 it would happen a few times, 2 out of 10 start ups.&amp;nbsp; When it fails my TOC breaks.&amp;nbsp; So I was naughty and put a loop in to simply try again.&amp;nbsp; The users didn't notice.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now, using 3.7 and IE8 I get this every time, and of course my loop goes on forever.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I get &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;XMLHttpRequest cannot load http://ARGISserver/arcgis/rest/services/LIVEinternal/aerials/MapServer/legend?f=json. The 'Access-Control-Allow-Origin' whitelists only 'http://appURL'. Origin 'http://appURL_dev' is not in the list, and is therefore not allowed access. (index):1
k {stack: "Error: Unable to load http://ARGISserver/arcgis/rest???ev/arcgis_js_api/library/3.7/3.7/init.js:3570:29)", message: "Unable to load http://ARGISserver/arcgis/rest/servic???nternal/aerials/MapServer/legend?f=json status: 0", response: Object, status: 0, responseText: ""???}


&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, have I forgotten that I've set one domain onto a whitelist somewhere?&amp;nbsp; I can't recall doing so.&amp;nbsp; Or is it a IE policy stting I have no control over?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Nov 2013 13:32:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-error-not-the-normal-sort/m-p/295851#M27158</guid>
      <dc:creator>AdrianMarsden</dc:creator>
      <dc:date>2013-11-15T13:32:59Z</dc:date>
    </item>
    <item>
      <title>Re: CORS error - not the normal sort</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-error-not-the-normal-sort/m-p/295852#M27159</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have the same error&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;did you find it out?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Nov 2013 14:25:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-error-not-the-normal-sort/m-p/295852#M27159</guid>
      <dc:creator>amenahgeebril</dc:creator>
      <dc:date>2013-11-23T14:25:35Z</dc:date>
    </item>
    <item>
      <title>Re: CORS error - not the normal sort</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-error-not-the-normal-sort/m-p/295853#M27160</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;adding &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp; &amp;lt;system.webServer&amp;gt;&amp;nbsp;&amp;nbsp; &amp;lt;httpProtocol&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;customHeaders&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;add name="Access-Control-Allow-Origin" value="*" /&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/customHeaders&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;lt;/httpProtocol&amp;gt;
 &amp;lt;/system.webServer&amp;gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;to my web.config (using IIS7 ) &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Helped a lot - still get the odd issue, but that cleared my main one.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 14:11:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-error-not-the-normal-sort/m-p/295853#M27160</guid>
      <dc:creator>AdrianMarsden</dc:creator>
      <dc:date>2021-12-11T14:11:57Z</dc:date>
    </item>
    <item>
      <title>Re: CORS error - not the normal sort</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-error-not-the-normal-sort/m-p/295854#M27161</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;OK - the error is now a bit more limited - certainly to Chrome based browsers.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I now get only&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I get &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&lt;SPAN style="color: #FF0000; font-family: Consolas;"&gt;XMLHttpRequest cannot load &lt;/SPAN&gt;&lt;A href="http://eddc-gis2/arcgis/rest/info?f=json" rel="nofollow noopener noreferrer" target="_blank"&gt;http://my server name/arcgis/rest/info?f=json&lt;/A&gt;&lt;SPAN style="color: #FF0000; font-family: Consolas;"&gt;. The 'Access-Control-Allow-Origin' whitelists only '&lt;/SPAN&gt;&lt;A href="http://emap2_dev/" rel="nofollow noopener noreferrer" target="_blank"&gt;http://&lt;/A&gt;myURL&lt;SPAN style="color: #FF0000; font-family: Consolas;"&gt;, *'. Origin '&lt;/SPAN&gt;&lt;A href="http://emap2_dev/" rel="nofollow noopener noreferrer" target="_blank"&gt;http://&lt;/A&gt;myURL&lt;SPAN style="color: #FF0000; font-family: Consolas;"&gt;' is not in the list, and is therefore not allowed access.&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The request to &lt;/SPAN&gt;&lt;A href="http://eddc-gis2/arcgis/rest/info?f=json" rel="nofollow noopener noreferrer" target="_blank"&gt;http://my server name/arcgis/rest/info?f=json&lt;/A&gt;&lt;SPAN&gt; seems to be how the API determines if the server supports CORS (see &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/71824-quot-NetworkError-404-Not-Found-http-tasks.arcgis.com-ArcGIS-rest-info-f-json-quot" rel="nofollow noopener noreferrer" target="_blank"&gt;http://forums.arcgis.com/threads/71824-quot-NetworkError-404-Not-Found-http-tasks.arcgis.com-ArcGIS-rest-info-f-json-quot&lt;/A&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It may be a genuine Chrome bug - see&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://code.google.com/p/chromium/issues/detail?id=321517" rel="nofollow noopener noreferrer" target="_blank"&gt;https://code.google.com/p/chromium/issues/detail?id=321517&lt;BR /&gt;&lt;BR /&gt;B&lt;/A&gt;&lt;SPAN&gt;ut it is causing issues here.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ACM&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 14:12:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-error-not-the-normal-sort/m-p/295854#M27161</guid>
      <dc:creator>AdrianMarsden</dc:creator>
      <dc:date>2021-12-11T14:12:00Z</dc:date>
    </item>
    <item>
      <title>Re: CORS error - not the normal sort</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-error-not-the-normal-sort/m-p/295855#M27162</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;bump - still getting this - anyone any ideas how to make it stop?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Nov 2014 13:29:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-error-not-the-normal-sort/m-p/295855#M27162</guid>
      <dc:creator>AdrianMarsden</dc:creator>
      <dc:date>2014-11-17T13:29:15Z</dc:date>
    </item>
    <item>
      <title>Re: CORS error - not the normal sort</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-error-not-the-normal-sort/m-p/295856#M27163</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Adrian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Have you considered just turning cors detection off? esri.config.defaults.io.corsDetection = false;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Nov 2014 14:37:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-error-not-the-normal-sort/m-p/295856#M27163</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2014-11-17T14:37:46Z</dc:date>
    </item>
    <item>
      <title>Re: CORS error - not the normal sort</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-error-not-the-normal-sort/m-p/295857#M27164</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure I know where to put that.&amp;nbsp; However, I replaced the * in the&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://eddc-gis2/arcgis/admin/system/handlers/rest/servicesdirectory" title="http://eddc-gis2/arcgis/admin/system/handlers/rest/servicesdirectory"&gt;http://server/arcgis/admin/system/handlers/rest/servicesdirectory&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With some random text and that sorted it.&amp;nbsp; I think too many things were trying to do the same thing - I have really no idea what I am talking about.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Nov 2014 14:40:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-error-not-the-normal-sort/m-p/295857#M27164</guid>
      <dc:creator>AdrianMarsden</dc:creator>
      <dc:date>2014-11-17T14:40:55Z</dc:date>
    </item>
    <item>
      <title>Re: CORS error - not the normal sort</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-error-not-the-normal-sort/m-p/295858#M27165</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Adrain,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; That line would just go in your code before to initiate your map var&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Nov 2014 14:53:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-error-not-the-normal-sort/m-p/295858#M27165</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2014-11-17T14:53:15Z</dc:date>
    </item>
    <item>
      <title>Re: CORS error - not the normal sort</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-error-not-the-normal-sort/m-p/295859#M27166</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Brill - that worked as well - much better than playing with options I had no idea about, many thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Nov 2014 15:29:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-error-not-the-normal-sort/m-p/295859#M27166</guid>
      <dc:creator>AdrianMarsden</dc:creator>
      <dc:date>2014-11-17T15:29:09Z</dc:date>
    </item>
    <item>
      <title>Re: CORS error - not the normal sort</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-error-not-the-normal-sort/m-p/295860#M27167</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using Server Manager, in IIS, you can navigate to the site and under the HTTP Response Headers you can choose ADD, then title &lt;SPAN style="color: #dd1144; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 12px; background-color: #f7f7f9;"&gt;Access-Control-Allow-Origin and value is the IP or domain of the site you want to allow. Could always choose * for everyone.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #dd1144; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 12px; background-color: #f7f7f9;"&gt;While you can do it in your code, Server side is probably the best option.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Nov 2014 15:42:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-error-not-the-normal-sort/m-p/295860#M27167</guid>
      <dc:creator>PaulCrickard1</dc:creator>
      <dc:date>2014-11-17T15:42:40Z</dc:date>
    </item>
  </channel>
</rss>

