最近,把一个网站部署到另一个服务器上,网站中一个功能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. oracle core 概述

    oracle数据库系统的架构及其复杂,其提供的特性也非常的多.作为一种关系型数据库,oracle提供的基本特性: transaction concurrency read consistent 而支撑 ...

  2. jQuery开始之旅

    (1)首先到http://jquery.com/download/网站进行现在jQuery库. (2)这里演示一下,使用CDN进行jQuery编程的例子: 选择的是jQuery的CDN,<scr ...

  3. 如何将数据库中已有表导入到powerDesigner生成pdm文件

    1.create new PDM: 2.select database menu; 3.click Reverse  Engineer database :4.then choose your scr ...

  4. POJ -- 1151

    Atlantis Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 16222   Accepted: 6172 Descrip ...

  5. SQLServer的ISNULL函数和Mysql的IFNULL函数

    SQL Serve的ISNULL函数: ISNULL(check_expression,replacement_value) 1.check_expression与replacement_value的 ...

  6. uva 10047 the monocyle (四维bfs)

    算法指南白书 维护一个四维数组,走一步更新一步 #include<cstdio> #include<cstring> #include<queue> #includ ...

  7. 最小生成树之算法记录【prime算法+Kruskal算法】【模板】

    首先说一下什么是树: 1.只含一个根节点 2.任意两个节点之间只能有一条或者没有线相连 3.任意两个节点之间都可以通过别的节点间接相连 4.除了根节点没一个节点都只有唯一的一个父节点 5.也有可能是空 ...

  8. 2013腾讯编程马拉松初赛第二场(3月22日) 小Q系列故事——为什么时光不能倒流 ---好水!!

    我以为我会是最坚强的那一个 我还是高估了自己 我以为你会是最无情的那一个 还是我贬低了自己 就算不能够在一起 我还是为你担心 就算你可能听不清 也代表我的心意 那北极星的眼泪 闪过你曾经的眼角迷离 那 ...

  9. https_request请求接口返回数据

    定义一个https_request方法 <?php function https_request($url, $data = null) { $curl = curl_init(); curl_ ...

  10. [置顶] sqlplus 使用笔记

    关于sqlplus常用命令的一些记录 这两天去参加了一个关于orcale 12C release1的技术交流会,主要关注的是orcale Spatial 在12C上面的一些新的变化,一起交流的有学校的 ...