Hi,
I am trying to get user groups in SOI in Arcgis server 10.9.1
HashSet<String> userRoleSet = ServerUtilities.GetGroupInfo(ServerUtilities.GetServerEnvironment());
It's working with MapServer but in FeatureServer it's return null.
Any suggestions?
do you mean FeatureServer in a service MapServer o hosted feature layer ?
FeatureServer hosted by ArcgisServer
SOIs are appropriate if you're looking to change the behavior of existing map or image service operations (including map and image service extensions, such as feature service operations)
I am looking to change the behavior of existing FeatureServer service.
with MapService I can get the user roles set but not in FeatureServer.
(Published on the same server)
Is your featureserver a feature service operations of map server ?
Yes.
Dear Dvirusb,
you can do this by getting the number of groups and then do a for loop to get all of them.
int iteration = ServerUtilities.getGroupInfo().size();
var roles = ServerUtilities.getServerUserInfo().getRoles();
var groups = ServerUtilities.getGroupInfo();
for (int i = 0; i <= iteration; i++) {
serverLog.addMessage(3, 200, "role of the " + user + " is " + roles.next());
}
I hope it works for you. If you need more clarification you can contact me by:
amir@wheretech.it
It seems related to this problem : BUG-000102477 for ArcGIS GIS Server (esri.com) but I see that 10.5 ...
Have use set disableCache property in service ? (see coding-practices-for-extensions )
Feature service are not cached by default so setting
"disableCaching": "true",
affected only MapServer.
This bug occurs also in version 11.1 - fully patched.