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} ...
随机推荐
- MySql索引总结
索引概念 B+树索引分为聚集索引和非聚集索引(辅助索引),但是两者的数据结构都和B+树一样,区别是存放的内容. 可以说数据库必须有索引,没有索引则检索过程变成了顺序查找,O(n)的时间复杂度几乎是不能 ...
- http status 301/302 & java重定向/转发
一.301/3021.什么是301转向?什么是301重定向? 301转向(或叫301重定向,301跳转)是当用户或搜索引擎向网站服务器发出浏览请求时,服务器返回的HTTP数据流中头信息(header) ...
- 检索 COM 类工厂中 CLSID 为 {000209FF-0000-0000-C000-000000000046} 的组件时失败,原因是出现以下错误: 80070005
检索 COM 类工厂中 CLSID 为 {000209FF-0000-0000-C000-000000000046} 的组件时失败,原因是出现以下错误: 80070005 在CSDN上总是有网友问这个 ...
- redis3.0配置文件详解
redis.conf #redis.conf # Redis configuration file example. # ./redis-server /path/to/redis.conf #### ...
- [LeetCode] One Edit Distance 一个编辑距离
Given two strings S and T, determine if they are both one edit distance apart. 这道题是之前那道Edit Distance ...
- [LeetCode] Largest Rectangle in Histogram 直方图中最大的矩形
Given n non-negative integers representing the histogram's bar height where the width of each bar is ...
- Java序列化与反序列化
Java序列化与反序列化是什么?为什么需要序列化与反序列化?如何实现Java序列化与反序列化?本文围绕这些问题进行了探讨. 1.Java序列化与反序列化 Java序列化是指把Java对象转换为字节序列 ...
- 使用Xcode7的Instruments检测解决iOS内存泄露
文/笨笨的糯糯(简书作者)原文链接:http://www.jianshu.com/p/0837331875f0著作权归作者所有,转载请联系作者获得授权,并标注“简书作者”. 作为一名iOS开发攻城狮, ...
- web前端面试试题总结---html篇
HTML Doctype作用?标准模式与兼容模式各有什么区别? (1).<!DOCTYPE>声明位于位于HTML文档中的第一行,处于 <html> 标签之前.告知浏览器的解析器 ...
- 用libcurl 登录网站
libcurl 可以发送和接收HTTP消息,因此可以发送用户名.密码和验证码来登录网站,网上有不少这方面的内容,但不甚完整,我摸索了两天,将其中要点记录下来. 基本步骤 正常访问登录页面,访问时,设置 ...