AnsweredAssumed Answered

COM Error using Task Scheduler to Create ProcessBook File.

Question asked by EricPalmquist on Aug 11, 2016

I have developed a c# console application that will create ProcessBook files.  It runs fine interactively, however when I try to run it as a scheduled task I get this error

System.UnauthorizedAccessException: Retrieving the COM class factory for component with CLSID {7BFECD80-1B23-101C-B28E-00AA0022EF07} failed due to the following error: 80070005 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)).

 

on this line of code:

PBObjLib.Application PBApplication = new PBObjLib.Application();

 

The account that I am running this as is an administrator.

 

It sounds like I need to set up permissions for ProcessBook and DCOM Config, so I granted the account full permissions at the DCOM "My Computer" level and now at the same line of code I get

 

System.Runtime.InteropServices.COMException (0x80080005): Retrieving the COM class factory for component with CLSID {7BFECD80-1B23-101C-B28E-00AA0022EF07} failed due to the following error: 80080005 Server execution failed (Exception from HRESULT: 0x80080005 (CO_E_SERVER_EXEC_FAILURE))

 

I suspect that I need to grant DCOM permissions to the ProcessBook application, but this does not show up in the list of DCOM applications

 

Any help is appreciated!

Outcomes