laptop and a wrench

Bug

The EnvironmentManager singleton object in the ServerLogger.GetServerEnvironment method is not instantiated following the documentation.

Zuletzt veröffentlicht: June 22, 2017 ArcGIS GIS Server
Bug-ID-Nummer BUG-000102447
EingereichtJanuary 26, 2017
Zuletzt geändertJuly 28, 2020
Gilt fürArcGIS GIS Server
Gefunden in Version10.2.1
Server-PlattformWindows
Client-PlattformN/A
Version Fixed10.5.1
StatusFixed

Zusätzliche Informationen

The issue is not reproducible using our own programs and no code has been submitted that does reproduce the issue. Additional steps have been requested to reproduce the issue, but no further steps are available. If additional steps to reproduce the problem can be provided then the issue can be re-evaluated.

Workaround

Several ArcGIS GIS Server 10.6.1 users experienced "System.InvalidCastException: Unable to cast object of type 'System.__ComObject' to type 'ESRI.ArcGIS.esriSystem.EnvironmentManagerClass'." exception thrown at IEnvironmentManager environmentManager = new EnvironmentManager() as IEnvironmentManager;To fix the above exception, instantiate EnvironmentManager as singleton as the code below:Type t = Type.GetTypeFromProgID("esriSystem.EnvironmentManager");System.Object obj = Activator.CreateInstance(t);IEnvironmentManager pEnvMgr = obj as IEnvironmentManager;

Schritte zur Reproduzierung

Bug-ID: BUG-000102447

Software:

  • ArcGIS GIS Server

Hilfe von ArcGIS-Expert*innen erhalten

Technischen Support kontaktieren

Die Esri Support-App herunterladen

Zu den Download-Optionen

Weitere Informationen zu diesem Thema erkunden