<?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: how to test problems with query task using dynamic proxy in ArcGIS API for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-to-test-problems-with-query-task-using-dynamic/m-p/572078#M12881</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The problem is solved with the help of ESRI technical support.&amp;nbsp; The string was not being parsed correctly.&amp;nbsp; In the proxy.ashx file, in the ProcessRequest function, the following line:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;string uri = Uri.UnescapeDataString(context.Request.QueryString.ToString());&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;must be changed to:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;string uri = context.Request.Url.Query.Substring(1);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As Dasa mentioned, this has already been fixed in the new asp.NET proxy with the link&amp;nbsp; provided in Dasa's last post, but as far as I can tell this doesn't work with a dynamic proxy, so if you use the dynamic proxy created by Thang Le mentioned in my last post, you would need to make this change if using wildcards in your where clause.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sebastian Roberts&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 28 Sep 2010 23:22:53 GMT</pubDate>
    <dc:creator>SebastianRoberts</dc:creator>
    <dc:date>2010-09-28T23:22:53Z</dc:date>
    <item>
      <title>how to test problems with query task using dynamic proxy</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-to-test-problems-with-query-task-using-dynamic/m-p/572073#M12876</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have set up a secured service and am accessing it with the search/select tool.&amp;nbsp; I set up a dynamic proxy, and set the querytask.proxyURL property = &lt;/SPAN&gt;&lt;A href="http://gisWEBServer/proxy.ashx"&gt;http://gisWEBServer/proxy.ashx&lt;/A&gt;&lt;SPAN&gt;.&amp;nbsp; This is working for some of my queries, but for others I get an "RPC fault" or "0 features selected".&amp;nbsp; If I try the same query through the rest API, it works, and if I move the map service to the public side and comment out the line in my Flex app that sets the queryTask.proxyURL, the query works as well.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How can I either&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;a) test the REST API with the query running through the proxy, or&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;b) debug the Flex application to get more info than just the "RPC fault" error message&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For A), I tried to run to test the REST API using the proxy with the following URL:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://gisWEBServer/proxy.ashx?http://gisDataserver/ArcGIS/rest/services/internal/parcels/MapServer/0/query"&gt;http://gisWEBServer/proxy.ashx?http://gisDataserver/ArcGIS/rest/services/internal/parcels/MapServer/0/query&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;However, I get a "Runtime Error&amp;nbsp; Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons)."&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Sep 2010 14:55:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-to-test-problems-with-query-task-using-dynamic/m-p/572073#M12876</guid>
      <dc:creator>SebastianRoberts</dc:creator>
      <dc:date>2010-09-02T14:55:42Z</dc:date>
    </item>
    <item>
      <title>Re: how to test problems with query task using dynamic proxy</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-to-test-problems-with-query-task-using-dynamic/m-p/572074#M12877</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;For B, there isn't a better option since Flash Player doesn't pass on the body of the HTTP response if the response code is not 200.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Sep 2010 18:43:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-to-test-problems-with-query-task-using-dynamic/m-p/572074#M12877</guid>
      <dc:creator>DasaPaddock</dc:creator>
      <dc:date>2010-09-02T18:43:35Z</dc:date>
    </item>
    <item>
      <title>Re: how to test problems with query task using dynamic proxy</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-to-test-problems-with-query-task-using-dynamic/m-p/572075#M12878</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am still having issues with this.&amp;nbsp; If I put the service in my public folder on our GIS server everything works fine.&amp;nbsp; If I move the service into the secured folder on the GIS server using a dynamic proxy, most of the queries work fine&amp;nbsp; unless I put a wildcard in the where clause (but only at the beginning).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, unsecured all queries below work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Secured,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This works:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; queryTask.where = APN LIKE '0840604%'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This doesn't work:&amp;nbsp;&amp;nbsp;&amp;nbsp; queryTask.where = APN LIKE '%0840604%'&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Why would adding the wild card at the beginning of the string make it fail?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The error I get is &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[RPC fault faultstring=""&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;faultCode = "400"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;faultDetail = "Unable to perform query.&amp;nbsp; Please check your parameters."}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I try the exact same queries through the REST API on the secured service they also work fine.&amp;nbsp; It seems that somehow the dynamic proxy doesn't like the wildcard.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for any insight,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Sebastian Roberts&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Sep 2010 16:18:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-to-test-problems-with-query-task-using-dynamic/m-p/572075#M12878</guid>
      <dc:creator>SebastianRoberts</dc:creator>
      <dc:date>2010-09-24T16:18:27Z</dc:date>
    </item>
    <item>
      <title>Re: how to test problems with query task using dynamic proxy</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-to-test-problems-with-query-task-using-dynamic/m-p/572076#M12879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Can you try downloading the ASP.NET proxy again at:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/webapi/flex/help/index.html#proxy.htm"&gt;http://help.arcgis.com/en/webapi/flex/help/index.html#proxy.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It has some fixes in this area that may resolve this issue.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Sep 2010 16:58:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-to-test-problems-with-query-task-using-dynamic/m-p/572076#M12879</guid>
      <dc:creator>DasaPaddock</dc:creator>
      <dc:date>2010-09-27T16:58:58Z</dc:date>
    </item>
    <item>
      <title>Re: how to test problems with query task using dynamic proxy</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-to-test-problems-with-query-task-using-dynamic/m-p/572077#M12880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Unfortunately, I am not using the out of the box token page because it does not support dynamic tokens.&amp;nbsp; I am using the dynamic token proxy page posted by Thang Le of ESRI in this &lt;/SPAN&gt;&lt;A href="http://forums.esri.com/Thread.asp?c=158&amp;amp;f=2396&amp;amp;t=297001"&gt;forum&lt;/A&gt;&lt;SPAN&gt;.&amp;nbsp; I am using his modified version, and don't think I have expertise to combine with the file you recommend.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I do think the wildcard causes the query to fail because the percent sign is used as a wildcard, but also is used in the query string (see below) perhaps an escape character.&amp;nbsp; Is there some way to change the proxy.ashx file so that the query string is parsed correctly when a wildcard is used at the beginning of the where clause?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The two queries are identical except for the where clause. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This query fails using:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where APN LIKE '%0840604%'&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;A class="jive-link-external-small" href="http://" rel="nofollow" target="_blank"&gt;http://&lt;/A&gt;&lt;SPAN&gt;&amp;lt;webserverName&amp;gt;/proxy.ashx?&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://" rel="nofollow" target="_blank"&gt;http://&lt;/A&gt;&lt;SPAN&gt;&amp;lt;ArcGISserverName&amp;gt;/ArcGIS/rest/services/internal/parcel_owner_mail_situs_sdevw_test/MapServer/0/query?where=APN%20LIKE%20%27%250840604%25%27&amp;amp;f=json&amp;amp;returnGeometry=false&amp;amp;outFields=APN&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This query works using:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where APN LIKE '0840604%'&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;A class="jive-link-external-small" href="http://" rel="nofollow" target="_blank"&gt;http://&lt;/A&gt;&lt;SPAN&gt;&amp;lt;webserverName&amp;gt;/proxy.ashx?&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://" rel="nofollow" target="_blank"&gt;http://&lt;/A&gt;&lt;SPAN&gt;&amp;lt;ArcGISserverName&amp;gt;/ArcGIS/rest/services/internal/parcel_owner_mail_situs_sdevw_test/MapServer/0/query?where=APN%20LIKE%20%270840604%25%27&amp;amp;f=json&amp;amp;returnGeometry=false&amp;amp;outFields=APN&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Sebastian Roberts&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Sep 2010 21:57:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-to-test-problems-with-query-task-using-dynamic/m-p/572077#M12880</guid>
      <dc:creator>SebastianRoberts</dc:creator>
      <dc:date>2010-09-27T21:57:19Z</dc:date>
    </item>
    <item>
      <title>Re: how to test problems with query task using dynamic proxy</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-to-test-problems-with-query-task-using-dynamic/m-p/572078#M12881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The problem is solved with the help of ESRI technical support.&amp;nbsp; The string was not being parsed correctly.&amp;nbsp; In the proxy.ashx file, in the ProcessRequest function, the following line:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;string uri = Uri.UnescapeDataString(context.Request.QueryString.ToString());&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;must be changed to:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;string uri = context.Request.Url.Query.Substring(1);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As Dasa mentioned, this has already been fixed in the new asp.NET proxy with the link&amp;nbsp; provided in Dasa's last post, but as far as I can tell this doesn't work with a dynamic proxy, so if you use the dynamic proxy created by Thang Le mentioned in my last post, you would need to make this change if using wildcards in your where clause.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sebastian Roberts&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Sep 2010 23:22:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/how-to-test-problems-with-query-task-using-dynamic/m-p/572078#M12881</guid>
      <dc:creator>SebastianRoberts</dc:creator>
      <dc:date>2010-09-28T23:22:53Z</dc:date>
    </item>
  </channel>
</rss>

