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.

Use dark colors for code blocksCopy
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.

Use dark colors for code blocksCopy
1
public static IServerEnvironment2 GetServerEnvironment()

ServerUtilities.GetRoleInformation(IServerUserInfo) Method

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

Use dark colors for code blocksCopy
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.

Use dark colors for code blocksCopy
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.