由于以下错误,检索 CLSID 为 {00020906-0000-0000-C000-000000000046} 的组件的 COM 类工厂失败:80070005
当我的 Web 服务尝试通过 .net webb 服务以编程方式打开 MS Word 文档时,我收到上述错误。 当我通过 Visual Studio 运行 Web 服务时,它工作正常,但是当我在 IIS 7 上部署 Web 服务时,出现错误
检索 COM 类工厂 具有 CLSID 的组件 {00020906-0000-0000-C000-000000000046} 由于以下错误而失败: 80070005
我见过类似的问题,并在 Stackoverflow、MSDN 和其他资源上尝试过他们的解决方案,但没有一个对我有用。大多数问题都是 2008/2007 年的旧问题。
我尝试使用 dcomcnfg 命令更改 DCOM 设置,并且添加了“网络服务”、“网络”用户,还在“Microsoft Word 文档”中添加了我自己的用户 ID组件属性并授予它们完全权限。我还在 web.config 中添加了 impersonate=true 属性。完成这一切之后我也收到错误。有人可以帮我吗?
我正在 MS vista 32 位操作系统上尝试所有这些,Office 版本是 Office 2003。
I am getting the above mentioned error when my web service tries to open MS word document programatically through my .net webb service.
When I run web service through visual studio, it works fine but when I deploy web service on IIS 7, I get the error
Retrieving the COM class factory for
component with CLSID
{00020906-0000-0000-C000-000000000046}
failed due to the following error:
80070005
I have seen similar questions and tried their solutions on Stackoverflow, MSDN and other resources also but none of them worked for me. Most of the questions were old dating back to 2008/ 2007.
I have tried to change DCOM setting using dcomcnfg command and I have added 'Network Service', 'Network' users, also have added my own user id in 'Microsoft Word Document' component properties and given them full permission. I have also added impersonate=true property in web.config. After doing all this also I am getting error. Can anyone please help me out?
I am trying all this on MS vista 32 bit OS and Office version is Office 2003.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我没有使用 Web 服务,而是使用 Windows 服务,并且当该服务调用尝试创建 Excel 对象的可执行文件时,我生成了相同的错误。我还阅读了许多其他资源,但没有一个对我有用。有几个非常接近,这导致我通过以下方式解决了问题:
错误消失,并且应用程序在服务运行时生成 Excel 文件。
我正在调查是否可以通过其他方式从 Windows 服务中获得此功能,因为我不确定此解决方案是否会产生副作用。如果我发现其他问题,我会进一步更新。
I'm not using a web service, but a windows service and I had the same error generated when the service called an executable that attempted to create an Excel object. I've also read many of the other resources and none of them quite worked for me. Several were very close which led me to solve the issue in the following way:
The error went away and the app produces the Excel file when the service runs.
I'm investigating if it is possible to get this working from a Windows service some other way because I'm not sure if this solution will have side effects. I will update further if I figure anything else out.