最近遇到一个棘手的问题,在C#中处理PPT转HTML的过程中需要用到COM组件,按照往常的设置如下:

1. Start->Run->DCOMCNFG->Component Services->Computers->My Computer->DCOM Config-》Microsoft PowerPoint 投影片

之后

单击属性打开此应用程序的属性对话框。

2. 单击标识选项卡,然后选择交互式用户。

3.单击"安全"选项卡,分别在"启动和激活权限"和"访问权限"组中选中"自定义",然后

自定义->编辑->添加Everyone、Network Service账户和IUSER_计算机名

4. 确保允许每个用户访问,然后单击确定。

5. 单击确定关闭 DCOMCNFG。

设置完之后错误还是存在,服务器的操作系统是windows server 2008 r2,所以在用户中没有找到ASPNET账户,以前只要添加ASPNET和Everyone的账户权限就会OK的,现在不行。

重新安装VS2005和Office(2003和2007)好几次,都还是解决不了。

最后再试着卸载Office,然后到注册表中有关Office的东西全部删除掉之后,再重新安装Office2007,问题陆续如下,以及针对这些问题陆续解决之后,最初的问题竟然解决了,呵呵。

Q:System.Runtime.InteropServices.COMException: PowerPoint could not
open the file.
A:on Windows Server 2008 you need to create the following
directories to get this to work:

Windows 2008 Server x64:
C:\Windows\SysWOW64\config\systemprofile\Desktop Windows 2008

Server x86: C:\Windows\System32\config\systemprofile\Desktop

Q:如果修改Dcom Config下的Microsoft PowerPoint
幻灯片-->Identity,问题又会出现如Acces is

Denied。或者是PowerPoint could not open the file.
A:解决办法可以重启机器试试。

Q:Win32Exception (0x80004005): Access is denied Error.
A: set the Impersonation right in the webconfig.

Q:Retrieving the COM class factory for component with CLSID
{91493441-5A91-11CF-8700-

00AA0060263B} failed due to the following error: 80080005、error:
80004023、error:

80040154.
A: Use the impersonation feature in the Web.config file

You can set fixed identities that have access to the remote
security-enhanced resource for

specific virtual directories by using the following setting in the
Web.config file for

your application.

       <identity impersonate="true"  userName="" password="" />

最新文章

  1. 字符串模式匹配之KMP算法图解与 next 数组原理和实现方案
  2. php URL判断
  3. ASIHTTPRequest详解 [经典]
  4. Android中自定义Activity和Dialog的位置大小背景和透明度等demo
  5. tcp的三次握手及四次挥手(连接与中断流程)
  6. js获取时间戳
  7. S2SH简单介绍和理解
  8. 【C语言探索之旅】 第二部分第二课:进击的指针,C语言的王牌!
  9. Mina框架与Spring整合配置文件
  10. CG之基本光照模型计算公式
  11. BogoMIPS与calibrate_delay
  12. Vmware Tools 下载及安装方法
  13. Pyhton 学习笔记1
  14. Spring Boot 2.0(二):Spring Boot 2.0尝鲜-动态 Banner
  15. 【译】gRPC负载均衡
  16. TCP协议,UDP,以及TCP通信服务器的文件传输
  17. 背水一战 Windows 10 (96) - 选取器: ContactPicker
  18. MongoDB数据库简单操作
  19. c#基础之异常处理
  20. 高版本js实现live

热门文章

  1. [改善Java代码]使用forName动态加载类文件
  2. BZOJ 3831
  3. SQL语句添加,删除主键
  4. usp_Copy_Unzip_DirFiles -- 拷贝,解压,列出文件名 from FTP Folder to Work Folder
  5. UIPickerView常见属性、常见方法(包括代理方法和数据源方法)的一些说明
  6. 【整理】c# 调用windows API(user32.dll)
  7. .Net平台开源作业调度框架Quartz.Net
  8. Js 循环结构
  9. 函数 resize和reserve的区别
  10. 2014-10 u-boot make过程分析