c# - Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed while configure exe in task scheduler -


i have created console application in c# read excel file. used microsoft interop dll manipulate excel file. excel file created in excel 2013. .net version 4.5 os : windows server 2012

it open excel file , add row sheet values.

the functionality working fine. when configure exe in task scheduler getting error.

retrieving com class factory component clsid {00024500-0000-0000-c000-000000000046} failed due following error: 80070005 access denied. (exception hresult: 0x80070005 (e_accessdenied)).

also have tried run exe in command prompt same user credential used configure task in scheduler.

my question is, exe working fine in command prompt not working in task scheduler.

any thoughts??

option1:

try following steps

  1. in dcomcnfg, right click on computer , select properties.
  2. choose com securities tab
  3. in access permissions, click "edit defaults" , add network service , give "allow local access" permission. same \users.
  4. in launch , activation permissions, click "edit defaults" , add network service , give "local launch" , "local activation" permission. same \users

have link if there permission problems

option 2:

if can't find reason, switch solution save method


Comments