检索 COM 类工厂中&nbsp…

来源:互联网 发布:三国乱世战车升级数据 编辑:程序博客网 时间:2024/05/19 13:42
  Message="检索 COM 类工厂中 CLSID 为{E01BE902-CC85-4B13-A828-02E789E0DDA9} 的组件时失败,原因是出现以下错误: 80040154。"

------------------------------------------------------------------------------------------------------------

一直以为是Engine的安装版本与机器上的其他ArcGIS产品的版本不符,可是最后折腾到了一台没有装ArcGIS产品的服务器上,问题依旧。VS调试发现,从程序的入口检查License文件开始便报如上错误。在确认ArcEngine的运行许可可用的前提下,究竟是什么问题导致的这种情况呢?最后,在ESRI的Supports中找到了相关信息,源网址为http://forums.esri.com/thread.asp?c=159&f=1707&t=219248&mc=6

解决方法:

The ArcObjectsCOM components can't be loaded by a 64-bit .Net app and thedefault compilation of a new project is for "Any CPU." Checkthe Build tab under the project properties and setthe platform target to x86。

Right click on the top icon in the SolutionExplorer and select the Properties entry in thecontext menu. In the Properties page, select theCompile tab to the left, then clock theAdvanced Compile Options button. This will bring up theAdvanced Compiler Settings dialog. The last entry inthe dialog is the Target CPU combobox, which defaultsto the value AnyCPU. Change that to x86 andclick OK.

This will solve the problems that manifest as anInnerException when you try to launch the app:

error number: "-2147221164"
message: "Retrieving the COM class factory for componentwith CLSID {E01BE902-CC85-4B13-A828-02E789E0DDA9} failed due to the following error:


作者:水木    
出处:http://www.hitidc.com/ 
0 0
原创粉丝点击