.net 由于以下错误,检索具有 CLSID {XXXX} 的组件的 COM 类工厂失败:80080005

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/279112/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-03 10:34:14  来源:igfitidea点击:

Retrieving the COM class factory for component with CLSID {XXXX} failed due to the following error: 80080005

.netcominterop

提问by user8032

What is the troubleshooting process for the "Retrieving the COM class factory for component with CLSID {XXXX} failed due to the following error: 80080005" errors in .Net? To clarify: I am getting this at runtime, on my XP machine, with client being .net code running under admin account. {XXXX} refers to one of our in-house COM components.

.Net 中的“Retrieving the COM class factory for component with CLSID {XXXX} failed due to the following error: 80080005”错误的故障排除过程是什么?澄清一下:我在运行时得到这个,在我的 XP 机器上,客户端是在管理员帐户下运行的 .net 代码。{XXXX} 指的是我们的内部 COM 组件之一。

From what I understand, 0x80080005 refers to "permission denied", but where do I go to check/change the permissions? Or am I completely wrong here, and the error is coming from the component itself, and not out of Windows COM subsystem?

据我了解,0x80080005 指的是“权限被拒绝”,但是我该去哪里检查/更改权限?或者我在这里完全错了,错误来自组件本身,而不是来自 Windows COM 子系统?

采纳答案by Mark Brackett

Seems to be a rather generic error relating to starting up the COM server. Possible issues include timeouts, logon failures(check the Q about CO_E_SERVER_EXEC_FAILURE), or security permissions, or (evidently) a VS2008 ATL bug. Hitting an error in CreateInstance would do the trick as well, I think.

似乎是一个与启动 COM 服务器有关的相当普遍的错误。可能的问题包括超时登录失败(检查 Q about CO_E_SERVER_EXEC_FAILURE)或安全权限,或(显然)VS2008 ATL 错误。我认为,在 CreateInstance 中遇到错误也可以解决问题。

I'd start by checking Event Log for anything interesting.

我首先检查事件日志是否有任何有趣的东西。

回答by Roger Lipscombe

0x80080005 is "Server Execution Failed", according to ERRLOOK.EXE. WinError.h lists this as CO_E_SERVER_EXEC_FAILURE. Not "Access Denied".

根据 ERRLOOK.EXE,0x80080005 是“服务器执行失败”。WinError.h 将其列为CO_E_SERVER_EXEC_FAILURE. 不是“拒绝访问”。

回答by Eric Ness

One thing that you can look at is the DCOM security configuration. It is controlled by the dcomcnfg utility. There are helpful tutorial videoson the web to explain how to use it. There is also a thread on the ASP.NETforum that discusses how to use dcomcnfg.

您可以查看的一件事是 DCOM 安全配置。它由 dcomcnfg 实用程序控制。网络上有一些有用的教程视频来解释如何使用它。ASP.NET论坛还有一个讨论如何使用 dcomcnfg 的主题。