AnsweredAssumed Answered

GeodatabaseSynchTask createReplica request embedding tasks parameters in query string - exceeds max query string length

Question asked by heathjr on May 24, 2016
Latest reply on May 25, 2016 by LDanzinger-esristaff

Noticing an odd behaviour with GeodatabaseSynchTask. It'll perform a createReplica operation using the POST method, but instead of embedding the task parameters within the request body, it's still adding them to the URL query string as if it's doing a GET.


I can replicate this behaviour using the Local Geodatabase Editing sample. If you inspect the createReplica request you can see behaviour described above. The behaviour I would expect to see can be observed by performing a createReplica operation against the REST endpoint directly (from the ArcGIS REST Services Directory); the parameters are embedded in the request body.


With certain parameter values, this can result in a server-side error if the serialized task parameters exceeds the configured max query string length, which is what I'm encountering due to the complexity of the geometry used to spatially filter the layers to be replicated, combined with numerous layer query definitions (serialized payload is 2700 characters).


The only workaround I can think of is to mimic the functionality of GeodatabaseSynchTask using NetworkRequest and timers. Has anyone else encountered this behaviour and if so how have you worked around it?