检索 COM 类工厂中 CLSID 为 {00024500-0000-0000-C000-00000


Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 8000401a.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Runtime.InteropServices.COMException: Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 8000401a.

Source Error:


Line 175:      
Line 176:        //创建一个名为WordApp的组件对象
Line 177:         Word.Application WordApp = new Word.ApplicationClass();
Line 178:        //创建一个名为WordDoc的文档对象
Line 179:         Word.Document WordDoc = WordApp.Documents.Add(ref Nothing, ref Nothing, ref Nothing, ref Nothing);

 

在创建 EXCEL 应用程序时出现错误:

检索 COM 类工厂中 CLSID 为 {00024500-0000-0000-C000-000000000046} 的组件时失败,原因是出现以下错误: 80070005

 


检查:

C:\Program Files\Microsoft Office\OFFICE11  添加 users 组读取权限


运行dcomcnfg打开组件服务,

依次展开"组件服务"->"计算机"->"我的电脑"->"DCOM配置"

找到"Microsoft Excel应用程序"或"Microsoft Word应用程序",

点击"安全"选项卡,

依次把"启动和激活权限","访问权限","配置权限",都选择为自定义,

然后依次点击它们的编辑,把users添加进去

 个别情况需要添加管理员账户和密码。



[本日志由 jit 于 2010-07-08 08:38 PM 编辑]
上一篇: Win7下IE8下载到99%就停止的解决方法
下一篇: 请求 System.Net.WebPermission 类型的权限已失败。
文章来自: 本站原创
引用通告: 查看所有引用 | 我要引用此文章
Tags:
相关日志:
评论: 0 | 引用: 0 | 查看次数: -
发表评论
昵 称:
密 码: 游客发言不需要密码.
邮 箱: 邮件地址支持Gravatar头像,邮箱地址不会公开.
网 址: 输入网址便于回访.
内 容:
验证码:
选 项:
虽然发表评论不用注册,但是为了保护您的发言权,建议您注册帐号.
字数限制 1000 字 | UBB代码 关闭 | [img]标签 关闭