环境及异常信息说明

环境说明: 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. NAS4Free 安装配置(五)配置SMB

    配置SMB 现在我们有2块存储设备,一块做下载盘,一块做数据盘 为了便于管理和扩展,我们分别在两块盘上建文件夹和Dataset 对于download盘,因为是UFS,所以只能建文件夹 我们把整个盘共享 ...

  2. Codeforces Round #276 (Div. 2) 解题报告

    题目地址:http://codeforces.com/contest/485 A题.Factory 模拟.判断是否出现循环,如果出现,肯定不可能. 代码: #include<cstdio> ...

  3. android 登录界面

    http://blog.csdn.net/jiabinjlu/article/details/6920967 http://blog.csdn.net/myserverthepeople/articl ...

  4. AltiumDesignerSummer9Build9.3.1.19182破解图文教程

    一.下载 AltiumDesignerSummer9Build9.3.1.19182 下载地址 http://www.verycd.com/topics/2769819/ 二.安装 一路确定啥的傻瓜式 ...

  5. 新唐的icp和isp

    ICP 的意思是 "在电路编程"(in Circuit Programming),PC 电脑可以运行 “NuMicro ICP Programming Tool”软件通过 Nu-L ...

  6. Roman numerals

    Roman numerals 罗马数字的题目, 注意几个关键的数字即可: (100, 400, 500, 900) -> ('C', 'CD', 'D', 'CM'); (10, 40, 50, ...

  7. mysql命令行的基本用法

    基础介绍:1.在linux下使用下列命令,请确认mysql的bin目录是否已经加入到PATH路径中,或者是已经进入到mysql安装路径下的bin目录查看PATHshell> echo $PATH ...

  8. jQuery Ajax 实例 ($.ajax、$.post、$.get)转

    Jquery在异步提交方面封装的很好,直接用AJAX非常麻烦,Jquery大大简化了我们的操作,不用考虑浏览器的诧异了. 推荐一篇不错的jQuery Ajax 实例文章,忘记了可以去看看,地址为:ht ...

  9. UVA 10594-Date Flow(无向图的最小费用网络流+题目给的数据有误)

    题意:给一个有N个点的无向图,要求从1向N传送一定的数据,每条边的容量是一定的,如果能做到,输出最小的费用,否则输出Impossible. 解析:由于是无向图,所以每个有连接的两个点要建4条边,分别是 ...

  10. Oracle与DB2的区别

    系统结构概述 首先,我们需要理解 Oracle 使用的架构,并理解它与 DB2 的不同之处.图 1 展示了 Oracle 的系统结构.将该图与 图 2 进行比较,后者显示了 DB2 的系统结构.在阅读 ...