This document is archived and information here might be outdated.  Recommended version.


IServerEnvironment2 Interface (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > System > ESRI.ArcGIS.esriSystem > Interfaces > IS > IServerEnvironment2 Interface
ArcGIS Developer Help

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

Name 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.

Classes that implement IServerEnvironment2

Classes Description
[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