Problem using > or < in REST query

2256
5
08-05-2010 02:57 PM
JamesStreet1
New Contributor
We seem to be having a problem using > or < in queries against our ArcGIS Server 10 map services. The problem originally started when trying to set the where clause in the query from our flex application to something like OBJECTID>1. Setting it to something like OBJECTID=12345 works fine.

I then tried this from the query html page for the rest endpoint and got a similar error when using the Query (Get) button on the page . The Query (Post) button works fine. This also eliminated the problem from being something wrong with the Flex API.

From the query page The error basically give the internet explorer page not found error and the URL being sent is

http://server1/ArcGIS/rest/services/App_MapServices/Electric_Distribution/MapServer/2/query?text=&ge...

When trying a similar query against one of ESRI's example map services everything seems to work fine. Has anyone else experienced this problem or know of a setting that maybe we missed when setting up the Map Service. Everything worked fine for us at 9.3.1

Thanks In Advance
0 Kudos
5 Replies
RaviNarayanan
Esri Contributor
James,

does it work when the output format is JSON? or if the character > is not encoded in the url such as:

http://server1/ArcGIS/rest/services/App_MapServices/Electric_Distribution/MapServer/2/query?text=&ge...>+1&time=&returnIdsOnly=false&returnGeometry=true&maxAllowableOff set=&outSR=&outFields=modified_date&f=json
0 Kudos
JamesStreet1
New Contributor
No, neither of those two work.
0 Kudos
AlexanderKhoroshun
New Contributor
I'm having the same problem with accents (�?, é, á, etc) in the query. Query (Get) doesn't work, but Query (Post) works fine.
0 Kudos
evemarwernick
New Contributor II
Hi Akhor,

Did you solve this problem?
0 Kudos
JustinHunter
New Contributor III
I assume using &gt; or %3E instead of > and &lt; or %3C instead of < would help.
0 Kudos