日本語
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;