首页 > 解决方案 > 80040154 类未注册

问题描述

We have an old asp.net website built in 32-bit platform using .net framework 2.0. This asp.net website is using a 3rd party com dll(testx.dll) along with interop dll(testx.Interop.dll) for one functionality. And the code to access this dll was written in the cs file which is in the App_Code folder in the project. This has been deployed to 32-bit windows server 2008 and everything is working fine here.

Now We are upgrading this application to .net framework 4.7.1 with the target platform as a 64-bit machine. And This we need to deploy in 64-bit Windows server 2016.

I have registered successfully the testx.dll as below and could see the entry under Wow6432Node in the registry, regsvr32 ..\testX.dll

我在尝试使用 VS2015 在我的本地计算机上访问 Com dll 中的类时遇到以下问题。我还尝试将目标平台从 Any CPU 更改为 x86,但遇到了同样的问题。

“由于以下错误,检索具有 CLSID {D00D7FB0-5997-11D4-8153-00E07D01A2E0} 的组件的 COM 类工厂失败:80040154 类未注册(HRESULT 异常:0x80040154 (REGDB_E_CLASSNOTREG))。”

令人惊讶的是,当我尝试使用示例控制台应用程序验证相同的 com dll 时,一切正常。这再次使用 .net 框架 4.7.1,目标平台为 Any CPU。此外,它适用于两个目标平台 Any CPU 或 x86。

如果我在这里遗漏了什么,你能帮忙吗?

标签: asp.net.netcom

解决方案


推荐阅读