<?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: the end of 2019 and still battling CORS issues in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/the-end-of-2019-and-still-battling-cors-issues/m-p/468657#M43445</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Doh! For some reason the geometry and other URLs are now different from my original code - and I should have been getting 404, rather than this COR error&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fstr-gis1.strata.local%2Farcgis%2Frest%2Fservices%2FUtilities%2FGeometry%2FGeometryServer" rel="nofollow" style="color: #287433; background-color: #ffffff; border: 0px; text-decoration: none; padding: 0px calc(12px + 0.35ex) 0px 0px;" target="_blank"&gt;http://esri-gis1/arcgis/rest/services/Utilities/Geometry/GeometryServer&lt;/A&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;But it is now&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;A class="link-titled" href="http://str-gis1/server/rest/services/Utilities/Geometry/GeometryServer" title="http://str-gis1/server/rest/services/Utilities/Geometry/GeometryServer"&gt;http://esri-gis1/server/rest/services/Utilities/Geometry/GeometryServer&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;That extra word "server" has crept in&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Nov 2019 15:14:31 GMT</pubDate>
    <dc:creator>AdrianMarsden</dc:creator>
    <dc:date>2019-11-13T15:14:31Z</dc:date>
    <item>
      <title>the end of 2019 and still battling CORS issues</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/the-end-of-2019-and-still-battling-cors-issues/m-p/468655#M43443</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is the error that never goes away and drives me nuts&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The site is using the latest 3.x api&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It does NOT use the proxy.aspx page&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the server is , lets say "esri-gis1"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there is an internal site in the internal DSN, let's call that "maps"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;users access the site by using "maps" as a URL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code calls maps from esri-gis1\arcgis\rest\services......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The map page works fine.&amp;nbsp; Requests are fine and if I examine the response headers for the basic requests it shows * in the Allow-Control-Allow-Origin&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The issues start when I call, for example I call the geometry service&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://str-gis1.strata.local/arcgis/rest/services/Utilities/Geometry/GeometryServer" title="http://str-gis1.strata.local/arcgis/rest/services/Utilities/Geometry/GeometryServer"&gt;http://esri-gis1/arcgis/rest/services/Utilities/Geometry/GeometryServer&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In a task that I use to convert the local grid to Long Lat&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I get the&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Access to XMLHttpRequest at 'http://esri-gis1/arcgis/rest/services/Utilities/Geometry/GeometryServer/project?.........' from origin 'http://maps' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got around this on the current site by using the Proxy page and adding&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; esri.config.defaults.io.corsEnabledServers.push("esri-gis1");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I ind the Proxy page adds more trouble than it solves.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help please?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ACM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Nov 2019 11:35:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/the-end-of-2019-and-still-battling-cors-issues/m-p/468655#M43443</guid>
      <dc:creator>AdrianMarsden</dc:creator>
      <dc:date>2019-11-13T11:35:30Z</dc:date>
    </item>
    <item>
      <title>Re: the end of 2019 and still battling CORS issues</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/the-end-of-2019-and-still-battling-cors-issues/m-p/468656#M43444</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;..and adding stuff to the AGS webconfig to enable * then gives errors that I have added too much in different places -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Access to XMLHttpRequest at 'http://esri-gis1/server/rest/info?f=json' from origin 'http://maps' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header contains multiple values 'http://maps, *', but only one is allowed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Nov 2019 12:05:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/the-end-of-2019-and-still-battling-cors-issues/m-p/468656#M43444</guid>
      <dc:creator>AdrianMarsden</dc:creator>
      <dc:date>2019-11-13T12:05:06Z</dc:date>
    </item>
    <item>
      <title>Re: the end of 2019 and still battling CORS issues</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/the-end-of-2019-and-still-battling-cors-issues/m-p/468657#M43445</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Doh! For some reason the geometry and other URLs are now different from my original code - and I should have been getting 404, rather than this COR error&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fstr-gis1.strata.local%2Farcgis%2Frest%2Fservices%2FUtilities%2FGeometry%2FGeometryServer" rel="nofollow" style="color: #287433; background-color: #ffffff; border: 0px; text-decoration: none; padding: 0px calc(12px + 0.35ex) 0px 0px;" target="_blank"&gt;http://esri-gis1/arcgis/rest/services/Utilities/Geometry/GeometryServer&lt;/A&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;But it is now&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;A class="link-titled" href="http://str-gis1/server/rest/services/Utilities/Geometry/GeometryServer" title="http://str-gis1/server/rest/services/Utilities/Geometry/GeometryServer"&gt;http://esri-gis1/server/rest/services/Utilities/Geometry/GeometryServer&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;That extra word "server" has crept in&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Nov 2019 15:14:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/the-end-of-2019-and-still-battling-cors-issues/m-p/468657#M43445</guid>
      <dc:creator>AdrianMarsden</dc:creator>
      <dc:date>2019-11-13T15:14:31Z</dc:date>
    </item>
    <item>
      <title>Re: the end of 2019 and still battling CORS issues</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/the-end-of-2019-and-still-battling-cors-issues/m-p/468658#M43446</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey&amp;nbsp;&lt;A href="https://community.esri.com/migrated-users/5859"&gt;Adrian Marsden&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you clarify a few more things here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. is your JavaScript application running on IIS and running on the server which has a DNS Alias as 'maps'?&lt;/P&gt;&lt;P&gt;2. this server 'maps', is different to 'esri-gis'?&lt;/P&gt;&lt;P&gt;3. you mentioned that your URL changed from&amp;nbsp;&lt;EM&gt;arcgis/rest/services&amp;nbsp;&lt;/EM&gt;to&amp;nbsp;&lt;EM&gt;server/rest/services&lt;/EM&gt;, does this mean someone has now configured an ArcGIS Web Adaptor called 'server' on the 'esri-gis' server and connected it with your ArcGIS Server on that machine?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By default, I think every ArcGIS Server deployment has CORS enabled and the response set to *, so you shouldn't need to be manually changing the underlying ArcGIS Server config.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Nov 2019 05:49:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/the-end-of-2019-and-still-battling-cors-issues/m-p/468658#M43446</guid>
      <dc:creator>JordanKing3</dc:creator>
      <dc:date>2019-11-18T05:49:00Z</dc:date>
    </item>
    <item>
      <title>Re: the end of 2019 and still battling CORS issues</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/the-end-of-2019-and-still-battling-cors-issues/m-p/468659#M43447</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK - I think this is all sorted - I don't know how/where but my code on the old server had&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fstr-gis1.strata.local%2Farcgis%2Frest%2Fservices%2FUtilities%2FGeometry%2FGeometryServer" rel="nofollow" style="color: #287433; background-color: #ffffff; border: 0px; text-decoration: none; padding: 0px calc(12px + 0.35ex) 0px 0px;" target="_blank"&gt;http://esri-gis1-oldserver/arcgis/rest/services/Utilities/Geometry/GeometryServer&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where as the new server has&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://esri-gis1-NEW-server/server/rest/services/Utilities/Geometry/GeometryServer" title="http://esri-gis1-NEW-server/server/rest/services/Utilities/Geometry/GeometryServer"&gt;http://esri-gis1-NEW-server/server/rest/services/Utilities/Geometry/GeometryServer&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would have expected that this would have caused a 404 error and I would have noticed straight away.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But instead I got the CORS error, so spent ages looking at that, rather than the real, and a lot simpler issue, of a bad URL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Odd, but I'm moving on now &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Nov 2019 09:16:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/the-end-of-2019-and-still-battling-cors-issues/m-p/468659#M43447</guid>
      <dc:creator>AdrianMarsden</dc:creator>
      <dc:date>2019-11-18T09:16:47Z</dc:date>
    </item>
  </channel>
</rss>

