Window Server 2008 R2 Exception from HRESULT: 0x800A03EC
2013-02-04 16:41
295 查看
我们新的生产环境, Windows 2008 64-bit, 自己写的一个 Windows Service, 用到了 Excel 的 DCOM 组件, 服务的执行账户是 SYSTEM 但是在执行中报出了一下错误:
Exception from HRESULT: 0x800A03EC
at Microsoft.Office.Interop.Excel.Workbooks.Open(String Filename, Object UpdateLinks, Object ReadOnly, Object Format, Object Password, Object WriteResPassword, Object IgnoreReadOnlyRecommended, Object Origin, Object Delimiter, Object Editable, Object Notify, Object Converter, Object AddToMru, Object Local, Object CorruptLoad)
Google 了大半天, 总算是找到了问题所在:
http://social.msdn.microsoft.com/Forums/en-US/innovateonoffice/thread/b81a3c4e-62db-488b-af06-44421818ef91?prof=required
在 Windows 2008 中, 如果以 SYSTEM 用户跑, 系统会去寻找 SYSTEM 这个用户的 Profile 目录, 而这个用户是不能按照交互用户登录的,而且在处理 Excel 文件的过程中, 一个 for SYSTEM 账户 "Desktop" 文件夹似乎是必须的
・Windows 2008 Server x64
在 "C:\Windows\SysWOW64\config\systemprofile" 下创建 "Desktop" 目录
C:\Windows\SysWOW64\config\systemprofile\Desktop
・Windows 2008 Server x86
在 "C:\Windows\config\systemprofile" 下创建 "Desktop" 目录
C:\Windows\System32\config\systemprofile\Desktop
注意 64-bit 的要在 SysWOW64 下面
Exception from HRESULT: 0x800A03EC
at Microsoft.Office.Interop.Excel.Workbooks.Open(String Filename, Object UpdateLinks, Object ReadOnly, Object Format, Object Password, Object WriteResPassword, Object IgnoreReadOnlyRecommended, Object Origin, Object Delimiter, Object Editable, Object Notify, Object Converter, Object AddToMru, Object Local, Object CorruptLoad)
Google 了大半天, 总算是找到了问题所在:
http://social.msdn.microsoft.com/Forums/en-US/innovateonoffice/thread/b81a3c4e-62db-488b-af06-44421818ef91?prof=required
在 Windows 2008 中, 如果以 SYSTEM 用户跑, 系统会去寻找 SYSTEM 这个用户的 Profile 目录, 而这个用户是不能按照交互用户登录的,而且在处理 Excel 文件的过程中, 一个 for SYSTEM 账户 "Desktop" 文件夹似乎是必须的
・Windows 2008 Server x64
在 "C:\Windows\SysWOW64\config\systemprofile" 下创建 "Desktop" 目录
C:\Windows\SysWOW64\config\systemprofile\Desktop
・Windows 2008 Server x86
在 "C:\Windows\config\systemprofile" 下创建 "Desktop" 目录
C:\Windows\System32\config\systemprofile\Desktop
注意 64-bit 的要在 SysWOW64 下面
相关文章推荐
- 数据导到excel时出现Exception from HRESULT: 0x800A03EC的异常
- [企业化NET]Window Server 2008 R2[1]-服务器基本安装即问题解决记录
- Window Server 2008 R2 上安装部署 Exchange 2010
- 打造Window Server 2008 R2的工作站
- window server 2008 r2 下如何安装IIS
- Window Server 2008 R2系统备份
- window server2008 r2 限制远程访问用户数量
- 打造Window Server 2008 R2的工作站
- Window Server 2008 R2 在Active Directory域中不能更改服务器密码策略
- Install IIS from Windows Server 2008 R2
- Window Server 2008 R2 +IIS7.5 部署WCF Rest问题
- Window Server 2008 R2 安装 Share Point 2013
- window server2008 r2 没有注册Ofiice组件的方法
- 如何在window server 2008 R2里添加x86客户端打印机驱动(64位服务器下添加32位客户端打印机驱动)
- Exception from HRESULT: 0x800A03EC
- Window Server 2008 R2无线网络无法使用
- Exception from HRESULT: 0x800A03EC
- [企业化NET]Window Server 2008 R2[2]-SVN 服务端 和 客户端 安装
- sql server 2008 安装 window server 2008 R2 64bit
- SSRS 2012 创建ReportServer数据库失败: The RPC server is not listening. (Exception from HRESULT: 0x800706B3)