ServerUtilities Class

Utility class for accessing Server information in SOEs and SOIs.


Methods

NameDescription
ServerUtilities.GetGroupInfo(IServerEnvironment2)Returns a list of groups for the user making the request.
ServerUtilities.GetServerEnvironment()Obtains reference to IServerEnvironment2 for current server environment.
ServerUtilities.GetRoleInformation(IServerUserInfo)Gets roles for the user making a request for a standalone server.
ServerUtilities.QueryConfigurationProperties(String, String)Retrieves service configuration properties.

ServerUtilities.GetGroupInfo(IServerEnvironment2) Method

Returns a list of groups for the user making the request.

For a federated server, this method returns a set of group names for the current user. For a standalone server, this method returns a set of roles for current user.

1
public static HashSet<string> GetGroupInfo(ESRI.ArcGIS.esriSystem.IServerEnvironment2 serverEnvironment)
ParameterTypeDescription
serverEnvironmentIServerEnvironment2Optional reference to IServerEnvironment2. Specify null to get current server environment.

ServerUtilities.GetServerEnvironment() Method

The GetServerEnvironment method obtains reference to IServerEnvironment2 for current server environment. This method does not cache any references. If you want to get cached IServerEnvironment2 reference for better performance, use SOIBase.ServerEnvironment property.

1
public static IServerEnvironment2 GetServerEnvironment()

ServerUtilities.GetRoleInformation(IServerUserInfo) Method

Gets roles for the user making a request for a standalone server.

1
public static HashSet<String> GetRoleInformation(ESRI.ArcGIS.esriSystem.IServerUserInfo userInfo)
ParameterTypeDescription
userInfoIServerUserInfoReference to IServerUserInfo instance.

ServerUtilities.QueryConfigurationProperties(String, String) Method

Retrieves service configuration properties.

1
public static IPropertySet QueryConfigurationProperties(String servicename, String typename)
ParameterDescription
servicenameService name.
typenameService type.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.

You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

Your ArcGIS portal

Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

Your ArcGIS Location Platform dashboard

Manage billing, monitor service usage, and access additional resources.

Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

Close