I get this error when I run the following code on windows 2003 server. The code works fine on a windows vista machine.
TaskService ts = new TaskService("\\buildserver");
TaskFolder tf = ts.RootFolder;
foreach (Task t in tf.Tasks)
MessageBox.Show("Name : " + t.Name + ", Last Task Result : " + t.LastTaskResult + ", Last Run Date : " + t.LastRunTime);
I cannot get LastRunTime and LastTaksResult, but getting the next run time works. I have tried the code on the Windows
2003 server and connecting from it remotely. I have specified a username and password and that also didn't work. I am
trying to write a gui to manage windows scheduled task accross multiple servers.