This document is archived and information here might be outdated. Recommended version. |
Provides access to Server configuration information.
The method of IServerEnvironment2 allows access to the IUserInfo interface to get the User and Roles of the current connection.
Name | 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. |
Interfaces | Description |
---|---|
IServerEnvironment | Provides access to Server configuration information. |
Classes | Description |
---|
// 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;
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