|
POST
|
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? 😉
... View more
08-05-2011
11:49 AM
|
0
|
0
|
473
|
|
POST
|
Well, I'm not sure how it's working but my flex app can get to all the services but if I try to get to them directly in a browser I get the following (see code below)... and it doesn't matter how deep on the url I go... I always get that error if I try to access via the browser. That is what I want... the flex app to work but direct browsing to not work. All I had to do was "disable services directory" and set the useAMF properties within my Flex code to "false". I even fired up Fiddler, copied out a map service url that was passed by my Flex app running, tried pasting it back into the browser and got the below message. That baffles me but for now, I'll take it. And just to be clear... I don't want users doing ANY direct browsing of my map services... I only want them to use the Flex app front end to do stuff. Error
Services Directory is disabled.
Code: 403 Ok, so the fun got spoiled. And this makes sense. I opened fiddler again and copied out a map service query URL from the Flex app... and sure enough, when pasted it back in the browser, it showed the response. So that explains that. I can, in theory, just change the parameters in the url and get a different response. Boo hoo. Guess there's no way around this unless I enable security for the server... ugh. So, the security rationale for disabling the service directory doesn't run very deep. But hey, how many malicious AGS/REST/JSON hackers could there be anyway? 😉
... View more
08-05-2011
11:42 AM
|
0
|
0
|
2993
|
|
POST
|
Didn't you ask how to do this? All the endpoint are still accessible, just not the root directory. Your flex app uses http calls. If your app can do it, so can a browser. For example: My folder http://www.mymanatee.org/arcgis/rest/services/ is forbidden but http://www.mymanatee.org/arcgis/rest/services/base-map/ is accessible. This allows a user to get to the service they need, but not "nose" around and see what else we are hosting. Well, I'm not sure how it's working but my flex app can get to all the services but if I try to get to them directly in a browser I get the following (see code below)... and it doesn't matter how deep on the url I go... I always get that error if I try to access via the browser. That is what I want... the flex app to work but direct browsing to not work. All I had to do was "disable services directory" and set the useAMF properties within my Flex code to "false". I even fired up Fiddler, copied out a map service url that was passed by my Flex app running, tried pasting it back into the browser and got the below message. That baffles me but for now, I'll take it. And just to be clear... I don't want users doing ANY direct browsing of my map services... I only want them to use the Flex app front end to do stuff. Error
Services Directory is disabled.
Code: 403
... View more
08-05-2011
11:30 AM
|
0
|
0
|
2993
|
|
POST
|
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.
... View more
08-05-2011
11:10 AM
|
0
|
0
|
473
|
|
POST
|
I don't think you can disable the endpoints, they have to be accessible. You can, however, disable the root directory. Doesn't prevent "stumble upon" discovery of individual services, but prevents browsing. We took the easy route, and just used a web application firewall (reverse proxy) for our servers. We then just make endpoints for the subfolders in /arcgis/rest/services/foldername but not the /services directory. Down side, you have to make a link for each folder, and each service must be in a folder Up side, no root browsing. Thanks for all the options. Just curious though... what's the point of "disabling the services directory" then? I mean, if you do that, you might as well uninstall arcgis server... if you are using it for web access to map services. By the way, I was able to go in and set all my Flex objects that default to AMF transport to "false". So, for example, featureLayer.selectFeatures() works if I set featureLayer.useAMF=false; Now if I disable the services directory, everything works just fine.
... View more
08-05-2011
10:28 AM
|
0
|
0
|
2993
|
|
POST
|
I've got a AGS/Flex app that's been working great for the past year. I would like to now disable the services directory from being accessible via the browser but would still like all the functionality within the Flex app of the exposed map services of our AGS installation. Should that be doable? I've been trying it and I get stream errors on certain operations like "featureLayer.selectFeatures". If I enable the services directory again, that operations works just fine. Assuming there are no bugs in the Flex or REST API regarding this... I'm at a loss as to what the good of "disable services directory" is. I've looked up the REST API documentation on the services directory options and it only mentions how to disable the directory but doesn't explain any best practices or rationale for doing so. Anyone got some knowledge on this? Thanks much, -Royce
... View more
08-05-2011
06:49 AM
|
0
|
11
|
7857
|
|
POST
|
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
... View more
08-04-2011
03:11 PM
|
0
|
0
|
473
|
|
POST
|
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
... View more
08-04-2011
02:40 PM
|
0
|
4
|
906
|
|
POST
|
Ok, I added mx.swc and sparkskins.swc to the project and I now have a map on my Droid!!! 🙂
... View more
07-08-2011
02:41 PM
|
0
|
0
|
323
|
|
POST
|
*first* I hooked Flash Builder up with 4.5.1 today, plugged my Droid in, created a new mobile app, attached the Flex/AGS SWC, put a map on the canvas, added a tiled service, gave it a url, ran the app... Starts to come up on phone, but bombs with a Class mx.controls.sliderClasses::Slider could not be found.
at com.esri.ags::Map() error. Is there any existing literature on this or know how on Flex/AGS/Air mobile? Thanks much, -Royce
... View more
07-08-2011
02:13 PM
|
0
|
2
|
635
|
|
POST
|
Royce, Hmm, Now that makes more sense. Unfortunately I don't know of a way to get the display expression without the identify task. Do you know any way to get IdentifyTask to run against a layer using a poly geometry in any other way besides the "intersecting" relationship (which seems to be the way it's doing it by default)?
... View more
06-09-2011
10:31 AM
|
0
|
0
|
806
|
|
POST
|
Royce, Once you know what the DisplayField is than you just make sure that it is one of the returned fields in your query... I am not sure what the hangup is? Ah, yes, my bad... In the mxd, the "displayfield" is a custom expression... I should be saying "Display Expression"... not "displayField". That Display Expression is a combo of a couple fields. IdentifyResult.value returns whatever is defined in that expression. No way to get at that via QueryTask or any other way... is there? Sorry, didn't make that clear in the OP. It's great that you can use custom geometries to base Identify Task on (such as a buffer poly), but not allowing the user to have options like "completely within" or "completely outside" renders IdentifyTask unusable in my case. And since QueryTask can't get at that "Display Expression" as defined in the mxd, I'm dead in the water there too.
... View more
06-09-2011
09:42 AM
|
0
|
0
|
806
|
|
POST
|
Royce, Sure you can get the DisplayField from the LayerDetails for any layer. http://help.arcgis.com/en/webapi/flex/apiref/com/esri/ags/layers/supportClasses/LayerDetails.html I guess I meant, getting the actual displayField value for a feature.
... View more
06-09-2011
09:27 AM
|
0
|
0
|
806
|
|
POST
|
For that matter, is there any way to get at the "DisplayField" as defined in the service mxd other than doing an IdentifyTask -> IdentifyResult?
... View more
06-09-2011
08:51 AM
|
0
|
0
|
806
|
|
POST
|
I've got an app where I'm currently using the IdentifyTask to allow the user to click the map and get info about features. They would like to add functionality to add on a buffer radius to the features that were the target of the Identify and get all features either completely within or completely within/intersecting the buffer boundary. I started going down the path of taking the features that were within the Identify tolerance, buffering those, then running a queryTask back on that layer with the resulting buffer. However, the app in it's current state relies heavily on the "displayField" defined in the MXD being returned in the identifyResult and displayed to the user. QueryTasks do not return DisplayField values in the results. So that's a Fail. Then I moved over to trying out the IdentifyTask against the buffer polygon geometry but that doesn't support doing spatial relationship options, such as "completely within". Do I need to tell my client that they can't have their cake and eat it too or will one of these two options (IdentifyTask or QueryTask) tackle both the bolded requirements above? For the Flex API Devs... Would it be possible to add the DisplayField value to returned features of a QueryTask in future release of the API?
... View more
06-08-2011
07:11 PM
|
0
|
7
|
933
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 07-21-2020 10:08 AM | |
| 1 | 05-30-2018 02:39 PM | |
| 5 | 02-13-2015 10:07 AM | |
| 3 | 12-03-2019 09:48 AM | |
| 1 | 10-22-2015 01:15 PM |
| Online Status |
Offline
|
| Date Last Visited |
03-24-2021
06:29 PM
|