laptop and a wrench

漏洞

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

上次发布: June 22, 2017 ArcGIS GIS Server
漏洞 ID 编号 BUG-000102447
已提交January 26, 2017
上次修改时间August 26, 2025
适用范围ArcGIS GIS Server
找到的版本10.2.1
操作系统Windows OS
操作系统版本N/A
修正版本10.5.1
状态Fixed

附加信息

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.

解决办法

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;

重现步骤

漏洞 ID: BUG-000102447

软件:

  • ArcGIS GIS Server

当漏洞状态发生变化时获得通知

下载 Esri 支持应用程序

发现关于本主题的更多内容

获取来自 ArcGIS 专家的帮助

联系技术支持部门

下载 Esri 支持应用程序

转至下载选项