<?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 QueryTask and proxy problem - in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/querytask-and-proxy-problem/m-p/458898#M42375</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've constructed a query task that returns the number of points in a polygon.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This query task works perfectly if the query is against an internal map service (map service on the same arcgis server as the proxy).&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;However, if I set the query task to an external map service:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;queryTaskWithin = new esri.tasks.QueryTask("http://rmgsc.cr.usgs.gov/ArcGIS/rest/services/nhss_haz/MapServer/0");&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;but change nothing else about the query or query task, it fails with the following error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Error: Unable to load /proxy/proxy.ashx?&lt;A href="http://rmgsc.cr.usgs.gov/ArcGIS/rest/services/nhss_haz/MapServer/0/query"&gt;http://rmgsc.cr.usgs.gov/ArcGIS/rest/services/nhss_haz/MapServer/0/query&lt;/A&gt; status:403&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My proxy config shouldn't be the problem because - as I am on a test server, I've made it wide open, by setting ProxyConfig mustMatch="false". I didn't even need to include my internal map service in the proxy.config, and the query worked fine for that.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas what could be going on?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks, Jay&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 06 May 2012 18:17:57 GMT</pubDate>
    <dc:creator>JayGregory</dc:creator>
    <dc:date>2012-05-06T18:17:57Z</dc:date>
    <item>
      <title>QueryTask and proxy problem -</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/querytask-and-proxy-problem/m-p/458898#M42375</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've constructed a query task that returns the number of points in a polygon.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This query task works perfectly if the query is against an internal map service (map service on the same arcgis server as the proxy).&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;However, if I set the query task to an external map service:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;queryTaskWithin = new esri.tasks.QueryTask("http://rmgsc.cr.usgs.gov/ArcGIS/rest/services/nhss_haz/MapServer/0");&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;but change nothing else about the query or query task, it fails with the following error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Error: Unable to load /proxy/proxy.ashx?&lt;A href="http://rmgsc.cr.usgs.gov/ArcGIS/rest/services/nhss_haz/MapServer/0/query"&gt;http://rmgsc.cr.usgs.gov/ArcGIS/rest/services/nhss_haz/MapServer/0/query&lt;/A&gt; status:403&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My proxy config shouldn't be the problem because - as I am on a test server, I've made it wide open, by setting ProxyConfig mustMatch="false". I didn't even need to include my internal map service in the proxy.config, and the query worked fine for that.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas what could be going on?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks, Jay&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 06 May 2012 18:17:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/querytask-and-proxy-problem/m-p/458898#M42375</guid>
      <dc:creator>JayGregory</dc:creator>
      <dc:date>2012-05-06T18:17:57Z</dc:date>
    </item>
    <item>
      <title>Re: QueryTask and proxy problem -</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/querytask-and-proxy-problem/m-p/458899#M42376</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;What I understand from your description, place this &lt;/SPAN&gt;&lt;A href="http://services.arcgisonline.com/clientaccesspolicy.xml"&gt;http://services.arcgisonline.com/clientaccesspolicy.xml&lt;/A&gt;&lt;SPAN&gt; xml file in root directory of your server. Also place &lt;/SPAN&gt;&lt;A href="http://services.arcgisonline.com/crossdomain.xml"&gt;http://services.arcgisonline.com/crossdomain.xml&lt;/A&gt;&lt;SPAN&gt; this xml file in your servers root directory.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;What I mean from server's root directory is the same directory where you placed your proxy.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;These XML's help in granting access to request's coming from other domains to your server.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 May 2012 21:15:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/querytask-and-proxy-problem/m-p/458899#M42376</guid>
      <dc:creator>ShreyasVakil</dc:creator>
      <dc:date>2012-05-08T21:15:33Z</dc:date>
    </item>
    <item>
      <title>Re: QueryTask and proxy problem -</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/querytask-and-proxy-problem/m-p/458900#M42377</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for your help - sorry for not responding earlier.&amp;nbsp; I actually got around my issue by applying a layer definition.&amp;nbsp; The information I needed to filter by was contained in the title string (state).&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Jay&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;What I understand from your description, place this &lt;A href="http://services.arcgisonline.com/clientaccesspolicy.xml"&gt;http://services.arcgisonline.com/clientaccesspolicy.xml&lt;/A&gt; xml file in root directory of your server. Also place &lt;A href="http://services.arcgisonline.com/crossdomain.xml"&gt;http://services.arcgisonline.com/crossdomain.xml&lt;/A&gt; this xml file in your servers root directory.&lt;BR /&gt; &lt;BR /&gt;What I mean from server's root directory is the same directory where you placed your proxy.&lt;BR /&gt;&lt;BR /&gt;These XML's help in granting access to request's coming from other domains to your server.&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 May 2012 16:24:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/querytask-and-proxy-problem/m-p/458900#M42377</guid>
      <dc:creator>JayGregory</dc:creator>
      <dc:date>2012-05-13T16:24:47Z</dc:date>
    </item>
  </channel>
</rss>

