环境说明: Win2008 R2(中文版) x64 、IIS 7.0

功能说明:上传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.   右键--【属性】,在【标识】选项卡中选择“下列用户”,填入用户的用户名和密码(Administrator即可),如图:

5. 【安全】选项卡中,“启动和激活权限”、“访问权限”都选择【自定义】,如图:

”启动和激活权限“中,点击【编辑】--【添加】—“IIS_IUSRS”用户,并在权限中选择【本地启动】、【本地激活】,如图:

”访问权限”中,点击【编辑】--【添加】—“IIS_IUSRS”用户,并在权限中选择【本地访问】,如图:

点击【确定】,即可。

转载地址:http://blog.csdn.net/lllljz/article/details/44917545

C# Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} 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} fai ...

  2. 【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 ...

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

  4. 使用Gird++打印出现“Retrieving the COM class factory for component with CLSID”的解决办法

    我们的接口需要返回一个gird++生成PDF文件的二进制数据,在本地测试都很好,发布到服务器上一直出现“Retrieving the COM class factory for component w ...

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

  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: 80070005.

    异常:Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} ...

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

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

随机推荐

  1. Android 编程下的日志工具类

    package com.sunzn.app.util; import android.util.Log; public class Logger { public static int DEBUG_L ...

  2. C# 类型实例化的语法糖--unity下诡异结果

    类型实例化语法糖就是如下的用法: public class Abc { public int ID { get; set; } public string Name { get; set; } pub ...

  3. 解决问题:swiper动态加载图片后无法滑动

    原因:swiper在初始化的时候会扫描swiper-wrapper下面的swiper-slide的个数,从而完成初始化,但是由于动态加载时在初始化之后的动作,所以导致无法滑动. 解决方案 1:在动态获 ...

  4. java框架篇---struts实现拦截器

    Struts2的拦截器和Servlet过滤器类似.在执行Action的execute方法之前,Struts2会首先执行在struts.xml中引用的拦截器,在执行完所有引用的拦截器的intercept ...

  5. Mac OS X上搭建Apache、PHP、MySQL的Web服务器

    mac OS 系统太帅了,安装php的环境如此简单,大赞一个! 转载自http://jingyan.baidu.com/article/39810a23e1939fb636fda6a9.html 在M ...

  6. mongo源码学习(二)db.cpp之mongoDbMain方法分析

    mongo后台进程的入口:mongo/src/mongo/db/dbmain.cpp,wmain(for windows)和main函数,main函数也很简单,就是委托给db.cpp中的mongoDb ...

  7. shell常用命令大全

    目录: 一.文件目录类命令 二.文件压缩和归档类命令 三.系统状态类命令 四.网络类命令 五.其他 一.文件目录类命令 1.查看联机帮助信息. man命令.#man ls info命令. #info ...

  8. js 控制输入文字个数(换行不算)

    如题,换行符在textarea中是要当成一个字符的.用普通的maxlength属性就不行了,于是想到通过事件来控制输入文字的长度. 注意哦,回车换行不能算成字符.这样的话,普通的substring等方 ...

  9. 根据时间获取最新数据 SQL(每一个人或者每一项)

    -- 方法1 select a.* from table1 a from table1 b where b.name=a.name and b.gdtime>a.gdtime) -- 方法2 s ...

  10. Linux(CentOS)日常操作命令

    用硬件检测程序kuduz探测新硬件:service kudzu start (or restart)查看CPU信息:cat /proc/cpuinfo查看板卡信息:cat /proc/pci查看PCI ...