环境说明: 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. iOS 减法计算器

    一: 在界面上拖入相应的控件 二: 给每个控件设置关联 //监听按钮的点击 - (IBAction)compute:(id)sender; //第一个文本输入框的值 @property (weak, ...

  2. VirtualBox中安装CentOS-7问题说明

    之所以选择VirtualBox和CentOS,原因很简单. 目前我只有一台PC,用了几年了,性能很一般,我还需要用它做其他应用,不能直接装Linux,万一安装不成功,有可能一周内就完全没法学习了.以前 ...

  3. 【JavaScript】脚本

    javascript: void((function() { var as = document.getElementsByTagName('a'); for (var i = 0, j = as.l ...

  4. GBDT 迭代决策树

    GBDT(Gradient Boosting Decision Tree) 又叫 MART(Multiple Additive Regression Tree),是一种迭代的决策树算法,该算法由多棵决 ...

  5. MDK 的编译过程及文件类型全解

    MDK 的编译过程及文件类型全解 ------(在arm9的开发中,这些东西都是我们自己搞定的,但是在windows上,IDE帮我们做好了,了解这些对深入开发是很有帮助的,在有arm9开发的基础上,下 ...

  6. hdu1198(模拟搜索)

    这个题目,比较恶心,思路很是简单,就是模拟的时候有些麻烦......水题 #include<iostream> #include<cstdio> #include<cst ...

  7. ThinkPHP使用Smarty

    ThinkPHP支持多种php模板引擎,可以根据个人需要加以配置. 第一步: 首先去Smarty官网上下载一个Smarty. 第二步: 解压压缩包,会有两个文件夹:demo和libs.打开libs文件 ...

  8. javascript中json对象长度

    JSON中无法使用length去获取长度,length只针对数组对象适用: var data={"showdata":{"中国人民大学":{"2013 ...

  9. oc调javascript方法(evaluateJavaScript:)&&js给oc发通知

    在ios8中引入了WKWebView控件,通过在头文件引用 #import <WebKit/WebKit.h>来使用该控件, 这个控件与oc的原生控件uiwebview很相似,它更方便oc ...

  10. VC/Wince 实现仿Win8 Metro风格界面1——设计概述和自绘Button(附效果图)

    去年用VC做了一个仿Win8 Metro风格的界面,感觉挺有意思,最近打算把实现过程和一些技术原理记录下来. 主要是风格上类似Win8,其实功能上很多借鉴了Android的操作方式.界面只支持两种大小 ...