Excel automation failing on server Access Denied / HRESULT: 0x80070005 (E_ACCESSDENIED)

ぐ巨炮叔叔 提交于 2019-12-11 02:38:50

问题


I've got a Windows service working in dev and pre-prod that uses Office interop. I'm attempting to deploy in production (also Server 2008R2) and it's not working when it attempts to start Excel in the first place (create an Application instance). Error:

Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)).

  • The C:\Windows\SysWOW64\config\systemprofile\Desktop folder exists. (and sys32's for needless good measure)
  • Excel is installed and activated.
  • The account under which the service runs is a local admin.
  • Verified account has DCOM privileges.
  • I recommended against this direction in the first place.
  • Open XML is not an option at the moment.
  • I understand MS doesn't recommend this.

Has anyone encountered any other solutions to this error when instantiating Excel in code?

来源:https://stackoverflow.com/questions/18152049/excel-automation-failing-on-server-access-denied-hresult-0x80070005-e-access

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!