Connect Remote Task scheduler using c# throws error

1

An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in Microsoft.Win32.TaskScheduler.dll

Additional information:

The request is not supported. (Exception from HRESULT: 0x80070032)

My Code:

using (TaskService tasksrvc = new TaskService(@"\\hqbusa1057", "muthuusername", "igatate", "pwd"))
{
    Task task = tasksrvc.FindTask("POC", true); task.Run();
}
c#
asked on Stack Overflow Sep 27, 2017 by muthukumar Durai • edited Sep 27, 2017 by Petaflop

1 Answer

1

I had the same issue caused by the firewall on the requested computer.

Allow 'Remote Scheduled Task Management' in your Windows Firewall to prevent the error when a new TaskService is created.

Also, allowing 'Remote Event Log Management' may be helpful if you want to access task logs (history).

answered on Stack Overflow Mar 30, 2020 by Fenix • edited Aug 6, 2020 by Fenix

User contributions licensed under CC BY-SA 3.0