Query operation with amf output does not run when Rest service directory is disabled.

Discussion created by strider8 on Mar 20, 2012
We have quite a few map services on our ArcGIS server 10 Sp2 which are consumed in our custom Flex App. We disabled the Rest services directory, so as prevent casual users from accessing the map services from their web browsers. Our App works fine, except for one major problem. We are running query operations, and getting the result back in amf format. We found that this fails, with a 403 error, whenever the services directory is disabled.  Enabling the rest services directory through the rest admin, makes the same query run successfully.

We could reproduce this on our development as well as production machine.  Is this a known bug? Is there any workaround?