IServerEnvironment2 Interface

Provides access to Server configuration information.

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.

IServerEnvironment2.UserInfo Property

Retrieves information about current user.

Public ReadOnly Property UserInfo As IServerUserInfo
public IServerUserInfo UserInfo {get;}

Inherited Interfaces

Interfaces Description
IServerEnvironment Provides access to Server configuration information.

Classes that implement IServerEnvironment2

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

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.