Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80070005 拒绝访问。
这几天在写一个导出word的功能,使用 Microsoft.Vbe.Interop.dll和Office.dll 在本地都可以正常运行,但是上传到服务器后就报错,如下图:
对于此问题,也在网上查了一些资料,原因就是
这个服务组件的权限问题。
在服务器上,首先需要安装OFFICE软件
1,运行dcomcnfg打开组件服务
2,依次展开"组件服务"->"计算机"->"我的电脑"->"DCOM配置"
3,找到"Microsoft Word应用程序" 如下图:
4.如果找不到Microsoft Word 97-2003 文档,
1)运行comexp.msc -32打开组件服务(这个是32位,上面是64位)
2)如果还是没有组件则需要安装Office软件,这样Microsoft Word,Excel,PowerPoint这些组件就都有了。
5.右键[属性] 修改[标识],启动用户---->交互式用户
6 修改[安全]
添加“IIS_IUSRS”用户,并在权限中选择【本地启动】、【本地激活】,如下图:
如果还有以下错误:
Exception Details: System.ComponentModel.Win32Exception: 拒绝访问。
在webconfig配置文件中加入如下节点:
<system.web>
<identity impersonate="true" userName="administrator" password="Dsog7GgETDhF"/>
<system.web>
最后确定保存,至此解决问题。
Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80070005 拒绝访问。的更多相关文章
- Retrieving the COM class factory for component with CLSID XX failed due to the following error: 80070005 拒绝访问。
环境及异常信息说明 环境说明: Win2008 R2 企业版 x64 .IIS 7.0 功能说明:服务端操作Excel,(上传Excel到服务器,并在服务器端读取Excel中的数据) 异常信息:Ret ...
- Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005 拒绝访问
异常信息:Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046 ...
- 错误:Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80070005 拒绝访问。
最近,把一个网站部署到另一个服务器上,网站中一个功能word转pdf报下面错误: 在此附上解决方案: 方法1:配置Web.Config文件,在每次请求时模拟本地系统的账户. 具体操作:在Web.Con ...
- C# Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005
环境说明: Win2008 R2(中文版) x64 .IIS 7.0 功能说明:上传Excel到服务器,并在服务器端读取Excel中的数据: 异常信息:Retrieving the COM class ...
- Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005.
Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} fai ...
- 【Excel】Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046}:
[Excel]Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-0000000000 ...
- C# - (0x80040154): Retrieving the COM class factory for component with CLSID {877AA945-1CB2-411C-ACD7-C70B1F9E2E32} failed
1. Exeption Error: System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM clas ...
- 使用Gird++打印出现“Retrieving the COM class factory for component with CLSID”的解决办法
我们的接口需要返回一个gird++生成PDF文件的二进制数据,在本地测试都很好,发布到服务器上一直出现“Retrieving the COM class factory for component w ...
- 异常:Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005.
异常:Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} ...
随机推荐
- C#用链式方法表达循环嵌套
情节故事得有情节,不喜欢情节的朋友可看第1版代码,然后直接跳至“三.想要链式写法” 一.起缘 故事缘于一位朋友的一道题: 朋友四人玩LOL游戏.第一局,分别选择位置:中单,上单,ADC,辅助:第二局新 ...
- Linux环境搭建-在虚拟机中安装Centos7.0
最近在空闲时间学习Linux环境中各种服务的安装与配置,都属于入门级别的,这里把所有的学习过程记录下来,和大家一起分享. 我的电脑系统是win7,所以我需要在win7上安装一个虚拟机-VMware,然 ...
- linux命令-系统命令
1.查看Linux磁盘空间大小 df -lh Filesystem 容量 已用 可用 已用% 挂载点 /dev/hda8 11G 6.0G 4.4G 58% / /dev/shm 236M 0 236 ...
- Android开发用过的十大框架
http://blog.csdn.net/u011200604/article/details/51695096 本文系多方综合与转载整合,意在Android开发中能够知道和使用一些好用的第三方支持, ...
- 树上启发式合并 (dsu on tree)
这个故事告诉我们,在做一个辣鸡出题人的比赛之前,最好先看看他发明了什么新姿势= =居然直接出了道裸题 参考链接: http://codeforces.com/blog/entry/44351(原文) ...
- Lua面线对象学习
--[[ ]] local userdata = {} local Register = {} function Register:del(key) userdata[self.namespace][ ...
- firefox 使用svg的image标签无法显示图片
在image标签上添加 height.width(不要用css属性) href属性前面加xlink: (Mozilla自己的MDN都说不加xlink了,搞鸡巴)
- [LeetCode] Sum of Left Leaves 左子叶之和
Find the sum of all left leaves in a given binary tree. Example: 3 / \ 9 20 / \ 15 7 There are two l ...
- 基于C/S架构的3D对战网络游戏C++框架_【不定期更新通知】
由于笔者最近有比赛项目要赶,这个基于C/S架构的3D对战网络游戏C++框架也遇到了一点瓶颈需要点时间沉淀,所以近一段时间不能保证每天更新了,会保持不定期更新.同时近期笔者也会多分享一些已经做过学过的C ...
- SD卡的监听
摘要:在一般应用中,如果需要对占用空间比较大的文件操作,需要监听SD卡的状态,Android中对SD卡的监听状态操作步骤如下: 一.创建一个类继承于BroadcastReceiver public c ...