环境及异常信息说明

环境说明: 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. 关于Repeater中绑定的控件不触发ItemCommand事件

    今天遇到 在repeater 中使用一个button,点击button然后跳转另外一个页面. html. <asp:Repeater ID="repeater" runat= ...

  2. 为Mac自带的Apache配置PHP和虚拟机

    操作系统:os x 10.11.2 1.启动apache 打开终端(terminal),输入命令:sudo apachectl -k start ; 在浏览器地址栏中输入:http://localho ...

  3. python - num1 -初识python

    一.了解python python的创始人为吉多·范罗苏姆(Guido van Rossum).1989年的圣诞节期间,吉多·范罗苏姆为了在阿姆斯特丹打发时间,决心开发一个新的脚本解释程序,作为ABC ...

  4. 【笔记】Unix 平台标准

    POSIX 表示可移植操作系统接口(Portable Operating System Interface ,缩写为 POSIX ),POSIX标准定义了操作系统应该为应用程序提供的接口标准,是IEE ...

  5. pyqt5模块

  6. 函数:灵活即强大 - 零基础入门学习Python018

    函数:灵活即强大 让编程改变世界 Change the world by program 上节课我们基本介绍了Python函数的用法,非常简单.这节课我们主要针对函数的参数和返回值进一步深入学习.学习 ...

  7. NPM下载出错 No compatible version found

    前言 NPM大家都熟,天天都在用.最近,NPM不断出现的下载出错 “npm ERR! Error: No compatible version found” ,已经影响到正常的开发工作,到了不得不解决 ...

  8. Oracle 安装时候的网络相关内核参数

    http://www.cnblogs.com/gaojian/archive/2012/10/12/2721284.html http://blog.chinaunix.net/uid-2442641 ...

  9. SGU176 Flow construction

    http://acm.sgu.ru/problem.php?contest=0&problem=176 有源汇上下界最小流,可以选择跟有源汇上下界最大流一样的建图方式,然后用二分去二分t-&g ...

  10. 时间类处理<1>

    2016/05/31 14:47:21 [emerg] 14629#0: location "/nginx_status" is outside location "/p ...