Hi - We have a custom application filter that allows users to build complex queries and execute them again an ArcGIS REST API endpoint published to our federated ArcGIS enterprise environment. The functionality works fine for medium query strings (< 10 clauses). However, large query strings ( > 10 clauses) will intermittently throw a 404 File or Directory Not Found Error. We are executing said queries as a GET request as that is an application requirement at the moment. Is there a specified query length limit for GET requests against ArcGIS REST API endpoints? Is this documented anywhere? Thanks!
Solved! Go to Solution.
Hmm. Smells really familiar. I recently worked with someone whose IIS configuration blocked requests over a certain length (2130 characters - didn't matter if they were GET or POST). Requests over that length would resolve to 404s. And of course, that looked like an intermittent issue as queries got around the 2130 mark.
Can you check that your IIS configuration isn't doing the same? Once they fixed that, they were able to perform more complex queries. I never learnt why their IIS was configured that way, but it doesn't seem to be the default (note, this isn't really my wheelhouse, but this sounded familiar enough for me to throw this out there).
Hmm. Smells really familiar. I recently worked with someone whose IIS configuration blocked requests over a certain length (2130 characters - didn't matter if they were GET or POST). Requests over that length would resolve to 404s. And of course, that looked like an intermittent issue as queries got around the 2130 mark.
Can you check that your IIS configuration isn't doing the same? Once they fixed that, they were able to perform more complex queries. I never learnt why their IIS was configured that way, but it doesn't seem to be the default (note, this isn't really my wheelhouse, but this sounded familiar enough for me to throw this out there).
Thanks for this. I hadn't thought about IIS configs, but going to dig into and see if there is indeed a limit that is resulting in the 404s.
Found the setting in IIS that I believe will do the trick. Thanks for guiding me in the right direction!
For anyone out there with this issue: from the IIS site that hosts your arcgis server web adaptor(s) - note this may need also happen wherever portal web adaptors are as well, but in our case they are part of the same IIS Default site - do the following:
IIS Restart seems to be required for this config change to stick, so we'll be doing it over the weekend to avoid downtime.
You're my hero, thanks for posting exactly where to look! Was able to fix my issue
Is it possible to restructure your query and trim it down a bit?
this is what we did and we were able to get queries working again, however, we were still a bit irked by the non-descript 404 errors and by the fact that in the REST api spec there is no stated limit on query length as far as I now.