Provides access to Server configuration information.
Product Availability
Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.
Description
The method of IServerEnvironment2 allows access to the IUserInfo interface to get the User and Roles of the current connection.
Members
Description | ||
---|---|---|
CurrentJobID | Retrieves current job ID. | |
JobDirectory | Retrieves job directory for given job. | |
JobTracker | Retrieves IJobTracker interface that provides access to members that track and control execution of jobs. | |
Log | Retrieves an ILog interface that can be used to add logging messages. | |
Properties | Retrieves an IProperySet interface that provides access to the server configuration information. | |
UserInfo | Retrieves information about current user. |
Inherited Interfaces
Interfaces | Description |
---|---|
IServerEnvironment | Provides access to Server configuration information. |
[C#]
// Set reference to GUID for esriServer.IServerEnvironment2 UID uid = new UIDClass(); uid.Value = "32D4C328-E473-4615-922C-63C108F55E60"; // CoCreate an EnvironmentManager and retrieve the IServerEnvironment IEnvironmentManager environmentManager = new EnvironmentManager() as IEnvironmentManager; IServerEnvironment2 serverEnvironment = environmentManager.getEnvironment(uid); // Get log and server properties. ILog log = serverEnvironment.Log; IPropertySet propertySet = serverEnvironment.Properties;
[Visual Basic .NET]
Set reference to GUID for esriServer.IServerEnvironment2
Dim uid As UID = New UIDClass()
uid.Value = "32D4C328-E473-4615-922C-63C108F55E60"
' CoCreate an EnvironmentManager and retrieve the IServerEnvironment
Dim environmentManager As IEnvironmentManager = New TryCast(EnvironmentManager(), IEnvironmentManager)
Dim serverEnvironment As IServerEnvironment = environmentManager.getEnvironment(uid)
' Get log and server properties.
Dim log As ILog = serverEnvironment.Log
Dim propertySet As IPropertySet = serverEnvironment.Properties