Utility class for accessing Server information in SOEs and SOIs.
Methods
Name | Description |
---|---|
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.
public static HashSet<string> GetGroupInfo(ESRI.ArcGIS.esriSystem.IServerEnvironment2 serverEnvironment)
Parameter | Type | Description |
---|---|---|
serverEnvironment | IServerEnvironment2 | Optional 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.
public static IServerEnvironment2 GetServerEnvironment()
ServerUtilities.GetRoleInformation(IServerUserInfo) Method
Gets roles for the user making a request for a standalone server.
public static HashSet<String> GetRoleInformation(ESRI.ArcGIS.esriSystem.IServerUserInfo userInfo)
Parameter | Type | Description |
---|---|---|
userInfo | IServerUserInfo | Reference to IServerUserInfo instance. |
ServerUtilities.QueryConfigurationProperties(String, String) Method
Retrieves service configuration properties.
public static IPropertySet QueryConfigurationProperties(String servicename, String typename)
Parameter | Description |
---|---|
servicename | Service name. |
typename | Service type. |