检索组件的 COM 类工厂失败 [英] Retrieving the COM class factory for component failed
问题描述
我正在使用 excel 对象(COM 组件)进行 excel 操作.它在我的 PC 上运行良好,但是当我将应用程序部署到我们的 Intranet 时,我收到此错误:
I am using an excel object (COM component) for excel manipulation. It works fine on my PC, but when I deploy the application to our Intranet I am getting this error:
由于以下错误,检索具有 CLSID {00024500-0000-0000-C000-000000000046} 的组件的 COM 类工厂失败:80070005
Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005
我在 web.config
中使用 Windows 身份验证和 impersonate=true.
I am using windows authentication and impersonate=true in my web.config
.
我在组件服务中进行了所有设置,但仍然出现相同的错误.
I made all the settings in component service but it still gives the same error.
请帮忙
推荐答案
我在部署应用程序时遇到了同样的错误.我从这个站点得到了解决方案:CLSID XXX 的组件失败由于以下错误:80070005 访问被拒绝
I had the same error when I deployed my app. I've got solution from this site: Component with CLSID XXX failed due to the following error: 80070005 Access is denied
这是这个解决方案:
在DCOMCNFG中,右键单击我的电脑并选择属性.
选择COM 证券标签.
在访问权限中,点击编辑默认值并向其添加网络服务并授予它允许本地访问 许可.对 < 做同样的事情Machine_name >Users.
In Access Permissions, click Edit Defaults and add Network Service to it and give it Allow local access permission. Do the same for < Machine_name >Users.
在启动和激活权限中,点击编辑默认值并将网络服务添加到它并给它本地启动 和 本地激活 权限.对 < 做同样的事情Machine_name >Users.
In Launch and Activation Permissions, click Edit Defaults and add Network Service to it and give it Local launch and Local Activation permission. Do the same for < Machine_name >Users.
*我使用了表单身份验证.
*I used forms authentication.
这篇关于检索组件的 COM 类工厂失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!