ArcObjects Library Reference (System)  

IServerEnvironment2 Interface

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
Read-only property CurrentJobID Retrieves current job ID.
Read-only property JobDirectory Retrieves job directory for given job.
Read-only property JobTracker Retrieves IJobTracker interface that provides access to members that track and control execution of jobs.
Read-only property Log Retrieves an ILog interface that can be used to add logging messages.
Read-only property Properties Retrieves an IProperySet interface that provides access to the server configuration information.
Read-only property 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