Ever since upgrading to ArcGIS Server 10.5, we've been having problems with some older (Flex) websites that access our REST services. Whenever a map request involves filtering a layer via layerDefinitions, the map doesn't draw and we get this error:
{"error":{"code":400,"message":"Invalid 'layerDefs' is specified","details":[]}}
We've determined that this is because 10.5 now requires layerDefs to be expressed in JSON format rather than Simple Syntax. For example, one site might make a request like this:
https://alaskafisheries.noaa.gov/arcgis/rest/services/ShoreZoneFlexMapService/MapServer/export?size=...
which doesn't work. To work correctly, it has to look like this:
https://alaskafisheries.noaa.gov/arcgis/rest/services/ShoreZoneFlexMapService/MapServer/export?size=...
As far as I can tell, there's no way to change the way the Flex API formats the LayerDefs parameter in the request. And since ESRI is no longer supporting Flex, I'm not expecting to see any update on the Flex API to handle this.
I'm wondering if there is a way to get our server to rewrite the incoming request to change the layerDefs from Simple Syntax to JSON? I've tried using URL Rewrite in IIS -- even at the global level -- but I'm still getting
{"error":{"code":400,"message":"Invalid 'layerDefs' is specified","details":[]}}
so the rewrite isn't affecting the REST service request. Perhaps the REST service has its own redirect that bypasses my URL Rewrite rule?
Any ideas on this?