环境及异常信息说明

环境说明: Win2008 R2 企业版 x64 、IIS 7.0

功能说明:服务端操作Excel,(上传Excel到服务器,并在服务器端读取Excel中的数据)

异常信息:Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005 拒绝访问。 (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)).

处理过程

1.服务器端必须安装Office Excel软件;

2. 【开始】--【运行】--输入“dcomcnfg”--【确定】,打开【组件服务】窗口

3.【组件服务】--【计算机】--【我的电脑】--【DCOM配置】--【Microsoft Excel Application】(x64为系统需要按照下面的方法配置)

  若找不到【Microsoft Excel Application】,请参照以下方法:

  ①【开始】--【运行】--输入“mmc -32”--【确定】,打开【控制台】窗口;

  ② 选择【文件】—【添加/删除管理单元】--在“可用的管理单元”中选择【组件服务】--单击【添加】--【确定】;

4.右键 -- 【属性】--【安全】,“启动和激活权限”、“访问权限”、“配置权限”都选择【自定义】,三项都添加“IIS_IUSRS”用户,依次勾选1,“本地访问”“本地激活” 2,“本地访问” 3,“读取”;出于安全考虑其它项建议不勾选。

5.在【标识】选项卡中选择“交互式用户”

6.全部设置完毕自行测试,无需重启。如还出现拒绝访问等情况,在第4步中勾选所有权限,并添加“NETWORK SERVICE”、“ASPNET”(server 2003、XP系统)用户;第5步尝试用其它两种账户。

Retrieving the COM class factory for component with CLSID XX failed due to the following error: 80070005 拒绝访问。的更多相关文章

  1. 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 ...

  2. 错误: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 ...

  3. 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 在本地都可以正常运行,但是上传到服务器后就报错,如下图: 对于此问题,也在网上查了一些 ...

  4. 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 ...

  5. 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 ...

  6. 异常: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} ...

  7. 如何解决Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 8000401a. 问题

    在系统中需要把数据导出到excel并且压缩,然后报了这个问题: 我在网站上找到了方法: 地址:https://social.msdn.microsoft.com/Forums/vstudio/en-U ...

  8. 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 ...

  9. C#-Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046}

    异常信息如下 捕获到执行这句时异常: Excel.Application ep = new Excel.ApplicationClass(); Retrieving the COM class fac ...

随机推荐

  1. nodejs 保存 payload 发送过来的文件

    1:接受文件 http://stackoverflow.com/questions/24610996/how-to-get-uploaded-file-in-node-js-express-app-u ...

  2. Spark添加/更改集群节点需要修改的配置文件

    笔记:在配置好了spark后,如果需要添加/删除一个结点需要修改如下配置文件 cd $HADOOP/etc/hadoop 进入hadoop配置文件夹下 修改 slaves,将对应的节点添加/删除 修改 ...

  3. qemu cow镜像分析

    最近研究了以下qemu最简单的read on direct 镜像格式cow,在稀疏文件的模式下,这种方式还是比较简单,而且有优势的.其优势主要体现在云计算环境中,不需要用到qcow2的那些诸如内部快照 ...

  4. goldengate介绍

    Oracle Golden Gate软件是一种基于日志的结构化数据复制备份软件,它通过解析源数据库在线日志或归档日志获得数据的增量变化,再将这些变化应用到目标数据库,从而实现源数据库与目标数据库同步. ...

  5. cf C. Bombs

    http://codeforces.com/contest/350/problem/C 对n个点按曼哈顿距离排序. #include <cstdio> #include <cstri ...

  6. 能让汇编转到C51的初学者有更清晰的认识的一篇文章

    8051 是傳統 CISC 架構微控制器的代表,而 PIC 則是現代 RISC 架構微控制器的佳作. 雖然說 RISC 架構是公認未來微控制器的主流,但是 8051 藉著累積多年的發展環境與資源,特別 ...

  7. Cmake中的find_package功能

    find_package其实在windows下扮演的角色并不是很重要.在Unix下就非常重要了,find_package可以根据cmake内置的.cmake的脚本去找相应的库的模块,当然,内建了很多库 ...

  8. Android和FTP服务器交互,上传下载文件(实例demo)

    今天同学说他备份了联系人的数据放在一个文件里,想把它存到服务器上,以便之后可以进行下载恢复..于是帮他写了个上传,下载文件的demo 主要是 跟FTP服务器打交道-因为这个东东有免费的可以身亲哈 1. ...

  9. mongodb----pymongo的用法

    pymongo是python的一个模块,可能通过sudo pip install pymongo来安装. 导入pymongo import pymongo 创建连接 conn = pymongo.Co ...

  10. 瑞柏匡丞:app商业价值如何体现

    在互联网行业,想要实现商业价值,必须先实现用户价值.这个观点发源自PC统治互联网的时代,如今PC端的用户停留时间下降,用户行为趋于稳定保守,移动端则蒸蒸日上.而PC与移动端的区别之一是,PC端的用户流 ...