Select to view content in your preferred language

Disable Services Directory... problems

861
4
08-04-2011 02:40 PM
RoyceSimpson
Frequent Contributor
I'm under the impression that you can go into the REST/Admin area and disable the services directory from being used directly in a web browser and yet allow apps to still get maps, queries, etc...

Assuming this is correct, then I'm missing something because when I have it enabled, everything in the app works great, but if I disable the services directory, the map tiles, layers draw ok in the app, but if I try to add new features (via editing) or try to query a table/feature class I get errors.

What am I missing here?  I guess I don't really get how the "disable services directory" concept is supposed to work.

Thanks,
-Royce
Tags (2)
0 Kudos
4 Replies
RoyceSimpson
Frequent Contributor
I read another post the suggests this is an issue if "useamf" is set to true... however, in one instance I get errors on a featureLayer.selectFeatures operation.  As far as I can tell, there is no "useamf" property to be set and yet the request looks like this... where amf looks like it's being used.

.../ArcGIS/rest/services/maps/resources/FeatureServer/6/query?f=amf&where=LOGGEDIN%20%3D%201&%5Fts=1312499242074&returnGeometry=true&spatialRel=esriSpatialRelIntersects&outFields=%2A
0 Kudos
ReneRubalcava
Esri Frequent Contributor
If you set featureLayer.useAMF = false, do you still get the same request string and problems?
I believe if you do, the request will be ?f=json instead.
0 Kudos
RoyceSimpson
Frequent Contributor
If you set featureLayer.useAMF = false, do you still get the same request string and problems?
I believe if you do, the request will be ?f=json instead.


Bingo.  I didn't even look to see if FeatureLayer had a "useamf" property.  I set that to false and now it works. 

Thanks much.
0 Kudos
RoyceSimpson
Frequent Contributor
I guess there's not much point to disabling the services directory because all the end user needs to do is fire up something like Firebug or Fiddler, grab the URLs being passed from the flex app, paste those into the browser, change the query parameters and bingo, they get a new response.  Shucks.

But hey, how many malicious AGS/REST/JSON hackers could there be anyway?  😉
0 Kudos