Because the expression can be large, I am attempting to use the Proxy page, however I am seeing unusual results. I am finding that the proxy page is not always used, even though I am using the exact same query expression. I have conformed this by utilizing IE's debugger tool and also using Fiddler.
In my application if I add 2 layers (Tiled and Dynamic) prior to adding the Feature Layer I consistently see that the Proxy page is not being used. I can see via the debugging tools that a POST is being performed directly to my REST service. The content-length is over 6000.
If I add just the Tiled layer prior to adding the Feature Layer, I can see that an attempt is made to use the Proxy page. The proxy page is having issues, therefore my Feature Layer does not get added.
Can someone please explain why the Proxy page is not always used even though it would seem that it should be, given the length of the query string used in the setDefinitionExpession. I am very confused as to why layers added prior to adding a Feature Layer would affect the use of the proxy.