<?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: GeometryServic Buffer Task &amp;amp; Access-Control-Allow-Origin in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geometryservic-buffer-task-amp-amp-access-control/m-p/203297#M18879</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've tried the solution presented here and now I don't get an Access-Control-Allow-Origin policy violation, however my buffer task doesn't return to the javascript. I don't get an error or a success response:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/65708-Access-Control-Allow-Origin?highlight=access-control-allow-origin"&gt;http://forums.arcgis.com/threads/65708-Access-Control-Allow-Origin?highlight=access-control-allow-origin&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Looking at the web traffic the buffer task completes, but it seems that something within the API is failing because it doesn't fire a success/failure response.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help with this would be greatly appreciated. Has anyone else experienced this issue?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 04 Mar 2013 14:25:58 GMT</pubDate>
    <dc:creator>AaronConnolly</dc:creator>
    <dc:date>2013-03-04T14:25:58Z</dc:date>
    <item>
      <title>GeometryServic Buffer Task &amp;amp; Access-Control-Allow-Origin</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geometryservic-buffer-task-amp-amp-access-control/m-p/203296#M18878</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;BR /&gt;&lt;SPAN&gt;I've read alot about Access-Control-Allow-Origin issues with Chrome on this forum, already but I can't seem to find a solution to my problem. What is happening is this. A user searches for an address in my app and then my app takes the x,y of the address and attempts to have a buffer graphic created around that x,y and then I display the point and the circle buffer on the map. In all other browsers this works fine, but in Chrome the buffer task is killed by the browser:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
XMLHttpRequest cannot load http://mapping.theomegagroup.com/ArcGIS/rest/info?f=json. Origin http://www.crimemapping.com is not allowed by Access-Control-Allow-Origin. 
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In previous threads I have read that the Access-Control-Allow-Origin error can be safely ignored, but why does this same error break my buffer processing? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm not sure that adding this to my ArcGIS Server web.config is going to work because it opens it up for Cross Site scripting access, right? Though I've heard this would work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;httpProtocol&amp;gt;
&amp;nbsp;&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;nbsp; &amp;lt;add name="Access-Control-Allow-Origin" value="*" /&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/customHeaders&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/httpProtocol&amp;gt;
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can anyone help me with this? I don't control the request that is sent out by the buffer task and so I can't specify JSONP types, etc... Is this a proxy page issue? Why does this work in other browsers and not Chrome? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; -Aaron&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Mar 2013 21:13:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geometryservic-buffer-task-amp-amp-access-control/m-p/203296#M18878</guid>
      <dc:creator>AaronConnolly</dc:creator>
      <dc:date>2013-03-01T21:13:49Z</dc:date>
    </item>
    <item>
      <title>Re: GeometryServic Buffer Task &amp; Access-Control-Allow-Origin</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geometryservic-buffer-task-amp-amp-access-control/m-p/203297#M18879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've tried the solution presented here and now I don't get an Access-Control-Allow-Origin policy violation, however my buffer task doesn't return to the javascript. I don't get an error or a success response:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/65708-Access-Control-Allow-Origin?highlight=access-control-allow-origin"&gt;http://forums.arcgis.com/threads/65708-Access-Control-Allow-Origin?highlight=access-control-allow-origin&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Looking at the web traffic the buffer task completes, but it seems that something within the API is failing because it doesn't fire a success/failure response.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help with this would be greatly appreciated. Has anyone else experienced this issue?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Mar 2013 14:25:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geometryservic-buffer-task-amp-amp-access-control/m-p/203297#M18879</guid>
      <dc:creator>AaronConnolly</dc:creator>
      <dc:date>2013-03-04T14:25:58Z</dc:date>
    </item>
    <item>
      <title>Re: GeometryServic Buffer Task &amp; Access-Control-Allow-Origin</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geometryservic-buffer-task-amp-amp-access-control/m-p/203298#M18880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is your server cors enabled?&amp;nbsp; If not check out enable-cors.org for details on how to enable this capability for your server.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Mar 2013 15:06:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geometryservic-buffer-task-amp-amp-access-control/m-p/203298#M18880</guid>
      <dc:creator>KellyHutchins</dc:creator>
      <dc:date>2013-03-04T15:06:51Z</dc:date>
    </item>
    <item>
      <title>Re: GeometryServic Buffer Task &amp; Access-Control-Allow-Origin</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geometryservic-buffer-task-amp-amp-access-control/m-p/203299#M18881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Kelly,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm working from Visual Studio's and temp web server when run the app through the IDE. I'm also attempting to run a buffer task and then a query task on a service running on a machine in my domain. I'm not sure exactly how to test this server on my domain with the CORS test.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have the following in my app's web.config:&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;nbsp; &amp;lt;httpProtocol&amp;gt;
&amp;nbsp;&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;nbsp; &amp;lt;add name="Access-Control-Allow-Origin" value="*"/&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/customHeaders&amp;gt;
&amp;nbsp;&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;I have also added this to the /rest/web.config and /services/web.config in my ArcGIS Server instance running on the machine that hosts it. None of this works consistently.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've also tried updating from version 3.2 to 3.3 and have had some luck in that buffering seems to work, but now the queryTask is failing the same way the buffer failed previously. It runs and doesn't return a response. This happens in Firefox and Chrome. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What is going on? Why are these responses failing like this? What changed in the API or in Chrome to cause these issues? I'm really not sure what exactly is causing this issue and so I'm just guessing at the solution. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- Aaron&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 10:05:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geometryservic-buffer-task-amp-amp-access-control/m-p/203299#M18881</guid>
      <dc:creator>AaronConnolly</dc:creator>
      <dc:date>2021-12-11T10:05:57Z</dc:date>
    </item>
    <item>
      <title>Re: GeometryServic Buffer Task &amp; Access-Control-Allow-Origin</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geometryservic-buffer-task-amp-amp-access-control/m-p/203300#M18882</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Also, could this have anything to do with the settings in my proxy page?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Mar 2013 16:38:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geometryservic-buffer-task-amp-amp-access-control/m-p/203300#M18882</guid>
      <dc:creator>AaronConnolly</dc:creator>
      <dc:date>2013-03-04T16:38:31Z</dc:date>
    </item>
    <item>
      <title>Re: GeometryServic Buffer Task &amp; Access-Control-Allow-Origin</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geometryservic-buffer-task-amp-amp-access-control/m-p/203301#M18883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Is your server cors enabled?&amp;nbsp; If not check out enable-cors.org for details on how to enable this capability for your server.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I checked this out and then looked on my web server which is running ArcGIS Server and hosting the two services I'm attempting to use. I use a buffer task and a query task, and they're both targeting the same instance:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://some.local.domain/ArcGIS/rest/services/" rel="nofollow noopener noreferrer" target="_blank"&gt;http://some.local.domain/ArcGIS/rest/services/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;On 'some.local.domain' ArcGIS Server has several web.configs, one in /rest and another in /services, which of these (or both?) need to have this configuration set up: ? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;lt;httpProtocol&amp;gt;
&amp;nbsp;&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;nbsp; &amp;lt;add name="Access-Control-Allow-Origin" value="*" /&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/customHeaders&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/httpProtocol&amp;gt;
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've added this in both places to no avail. Perhaps I'm missing something here about CORS. Where on my "server" does this setting go? I'm just targeting ArcGIS Server locally.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 10:06:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geometryservic-buffer-task-amp-amp-access-control/m-p/203301#M18883</guid>
      <dc:creator>AaronConnolly</dc:creator>
      <dc:date>2021-12-11T10:06:00Z</dc:date>
    </item>
    <item>
      <title>Re: GeometryServic Buffer Task &amp; Access-Control-Allow-Origin</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geometryservic-buffer-task-amp-amp-access-control/m-p/203302#M18884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've followed the instructions for IIS7 found here:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://enable-cors.org/server.html"&gt;http://enable-cors.org/server.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I put a web.config in c:\inetpub\wwwroot\ArcGIS\ with the specified XML and the application is still not working. What am I doing wrong? Why would a buffer task work, but not a query task?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Mar 2013 14:42:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geometryservic-buffer-task-amp-amp-access-control/m-p/203302#M18884</guid>
      <dc:creator>AaronConnolly</dc:creator>
      <dc:date>2013-03-05T14:42:47Z</dc:date>
    </item>
  </channel>
</rss>

