中文
Continue in the app
漏洞编号 BUG-000102447
已提交 Jan 26, 2017
Modified Mar 30, 2022
严重性 Medium
应用于 ArcGIS GIS Server
找到的版本 10.2.1
程序语言 N/A
服务器平台 Windows OS N/A
客户端平台 Windows OS N/A
数据库 N/A
区域设置 N/A
状态 Unknown Text - Bugs/Fixed
Learn more
修正版本 10.5.1
SP 修复

漏洞 BUG-000102447

摘要

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


附加信息

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;