几天前有个项目,在本机开发完毕后,由于数据量过大,因此想要把程序迁移到服务器上进行测试,可谁晓得连着换了三台服务器,连续遭遇了如下错误,弄得一帮人是一头雾水。
错误信息:
未处理 System.TypeInitializationException
Message="“test.Program”的类型初始值设定项引发异常。"
Source="test"
TypeName="test.Program"
StackTrace:
在 test.Program.Main()
在 System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args) <script language="JavaScript" src="http://book.book560.com/ads/ads728x15.js" type="text/javascript"></script>
在 Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
在 System.Threading.ThreadHelper.ThreadStart()
InnerException: System.Runtime.InteropServices.COMException
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 ArcObjects COM components can't be loaded by a 64-bit .Net app and the default compilation of a new project is for "Any CPU." Check the Build tab under the project properties and set the platform target to x86。
Right click on the top icon in the Solution Explorer and select the Properties entry in the context menu. In the Properties page, select the Compile tab to the left, then clock the Advanced Compile Options button. This will bring up the Advanced Compiler Settings dialog. The last entry in the dialog is the Target CPU combobox, which defaults to the value AnyCPU. Change that to x86 and click OK.
This will solve the problems that manifest as an InnerException when you try to launch the app:
<script language="JavaScript" src="http://book.book560.com/ads/ads728x15.js" type="text/javascript"></script>
error number: "-2147221164"
message: "Retrieving the COM class factory for component with CLSID {E01BE902-CC85-4B13-A828-02E789E0DDA9} failed due to the following error:
分享到:
相关推荐
AE9.3的安装许可文件破解,供大家使用
土地规划数据库质检ArcEngine 9.3 Runtime全套许可
解决您9.3/9.3.1 Engine或SDE 2012-8-28到期的问题,欢迎使用.
里面有Arcengine9.3的安装包下载地址和全套许可文件下载地址,重新编辑,已降低分数,方便大家下载
ArcEngine9.3无限期许可文件,相当的不错,可以永久的使用
ArcGIS Engine9.3.1 授权文件 (有时间限制,我把系统时间设为2010.1.06左右就看可以用)
ArcGIS Engine 9.3 下载;ArcGIS Engine 9.3 SDK for .NET
ArcSDEforSQLServer9.3.1.ecp
arcgis server9.3 ecp文件,已验证可用;可应用于arcgis server安装
9.3.1最新64位去水印。
ArcEngine 9.3.1开发的影像重采样工具,利用Toolbox中的Resample工具,实现批量影像重采样工作,替公司其他部门的人开发的,小工具。
ArcGIS Desktop 9.3.1升级包,需要先安装9.3或9.3sp1,压缩包一共28个部分.
很难找的授权文件,共享给大家!好像还有一年过期!
ArcGIS_Engine9[1].3基础开发教程
scrt-sfx-9.3.1-2929.macos_x64.dmg
Arcgis engine 9.3 中文环境 新鲜出炉 用AE9.3开发的程序,由于客户要求中文,我用了许多AE 中的很多bean(比如toolbarbean),发布后是英文的。 于是百度,Google,搜AE9.3 中文环境,找了一下午都没有找到。 ...
DellEMC-iDRACTools-Web-WINX64-9.3.1-3669_A00.exeDellEMC-iDRACTools-Web-WINX64-9.3.1-3669_A00.exeDellEMC-iDRACTools-Web-WINX64-9.3.1-3669_A00.exe
arcengine9.3破解文件,过期时间到2035年。 拿来和大家分享。因为以前网络流传的一款,大概到2012年过期了,所以拿来和大家分享。
适应于首次安装arcserver的用户,详细说明arcserver9.3.1的安装及配置。
arcgis9.3.1licensemanager安装