最近,把一个网站部署到另一个服务器上,网站中一个功能word转pdf报下面错误:

在此附上解决方案:

方法1:配置Web.Config文件,在每次请求时模拟本地系统的账户。

    具体操作:在Web.Config文件中添加如下节点:

      <identity impersonate="true" userName="accountname" password="password" />
      其中:userName是要模拟的本地账号,password是该账号的密码。

方法2:在“DCOM配置”中,为IIS账号配置操作Word(其他Office对象也一样)的权限。

具体操作:“组件服务(Component Service)”->计算机(Computers)->我的电脑(My Computer)->DCOM配置(DCOM Config)->Microsoft Office Word 97 - 2003 文档,右击“Microsoft           Office Word 97 - 2003 文档”,选择“属性”进行一下两步操作:

     (1)在【标识(Identity)】选项卡中选中“交互式用户(The interactive user)”.

     (2)在【安全(Security)】选项卡中,分别给前两个组(启动和激活权限,访问权限)选择“自定义(customer)”,然后点“编辑”,在弹出的界面中添加IIS账号(Server版的操作系统一般为NETWORK             SERVICES,其他系统(XP)可能会是ASP.NET),并在下面的权限框中,给该用户分配所有权限。

注意:如果在组建服务中找不到Microsoft Office Word 97 - 2003 文档,主要是64位系统的问题,Office是32位的组件,所以在正常的系统组件服务里是看不到的 可以通过在运行里面输入 comexp.msc -32 来打开32位的组件服务,在里就能看到了)

方法3:为ASP.NET站点应用池分配本地账号

具体操作:在IIS中,为ASP.NET站点创建新的应用程序池,再改应用程序池属性的【标识(identity)】选项卡中,为“预定义账户”选择“本地系统(LocalSystem)”。

      如果是IIS7.0中,则按以下步骤操作:为ASP.NET站点创建新的应用程序池。选中该应用程序池,高级设置->进程模式—>标识:选择localSystem。

转载自:http://blog.csdn.net/phoenix_17th/article/details/5630677

http://stackoverflow.com/questions/13890906/retrieving-the-com-class-factory-for-component-with-clsid-000209ff-0000-0000-c0

错误:Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80070005 拒绝访问。的更多相关文章

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

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

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

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

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

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

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

随机推荐

  1. Android 性能优化 四 布局优化merge标签的使用

    小白:之前分享了ViewStub标签的使用,Android还有其他优化布局的方式吗? 小黑:<merge />标签用于减少View树的层次来优化Android的布局.先来用个例子演示一下: ...

  2. linux ERROR: ld.so: object '/lib/libcwait.so' from /etc/ld.so.preload cannot be preloaded: ignored.

    [root@ora9i 3238244]# lsb_release -a LSB Version:    :core-3.0-amd64:core-3.0-ia32:core-3.0-noarch:g ...

  3. bzoj2893

    有起点终点的限制的路径覆盖首先tarjan缩点成DAG似乎不能按照二分匹配的做法做那么建立源汇拆点i,i',这两点之间连一条下界为1上界无穷的边,其它边都是下界为0,上界正无穷然后就是有源有汇的最小流 ...

  4. BZOJ_1001_狼抓兔子_(平面图求最小割+对偶图求最短路)

    描述 http://www.lydsy.com/JudgeOnline/problem.php?id=1001 1001: [BeiJing2006]狼抓兔子 Time Limit: 15 Sec   ...

  5. sql 将Null 值转化成空字符串

    当Null + 任何字符串时,都等于Null. 因些用函数IsNull(字段名,''),如果字段名中的值是Null时,那么这个字段名的值是''. 例如::select code + IsNull('- ...

  6. HDOJ/HDU 1328 IBM Minus One(水题一个,试试手)

    Problem Description You may have heard of the book '2001 - A Space Odyssey' by Arthur C. Clarke, or ...

  7. linux 双网关双IP设置

    server:CentOS5.8 ip:172.16.8.11 Gateway:172.16.8.1 ip:10.120.6.78 Gateway:10.120.6.1 网卡配置: eth0 poin ...

  8. books

    <<learning opencv>>,   布拉德斯基 (Bradski.G.) (作者), 克勒 (Kaehler.A.) (作者),   这本书一定要第二版的,因为第二版 ...

  9. [学习笔记]设计模式之Singleton

    写在前面 为方便读者,本文已添加至索引: 设计模式 魔法手札索引 在前几篇笔记中,我们有了解了部分对象创建型模式,包括Builder(建造者).Abstract Factory(抽象工厂)和Facto ...

  10. Java Web学习笔记-Servlet不是线程安全的

    由于Servlet只会有一个实例,多个用户同时请求同一个Servlet时,Tomcat会派生出多条线程执行Servlet的代码,因此Servlet有线程不安全的隐患.如果设计不当,系统就会出现问题. ...