This project has moved. For the latest updates, please go here.

Getting "The request is not supported 0x80070032" after target changed to a server with a different OS

Topics: Errors
Jun 4, 2014 at 1:12 AM
Edited Jun 4, 2014 at 1:13 AM
A few months ago, I implemented some code that uses Task Scheduler Managed Wrapper (release 2.2.0) to trigger Task Scheduler tasks on a remote computer. It's worked fine since then until yesterday when the remote computer was replaced with a server that has a different operating server.

Now, I am running in to the "The request is not supported 0x80070032" error and haven't been able to figure out how to fix it.

Here are the specifics:

The old target server was running Windows Server 2008 R2.
The new target server is running Windows Server 2012 R2.

The pertinent code is very simple and is as follows:
using (Microsoft.Win32.TaskScheduler.TaskService ts = new TaskService(serverName, userName, domain, password))
            {
                Microsoft.Win32.TaskScheduler.Task task = ts.FindTask("TrxImporter");
                TaskState state = TaskState.Unknown;
                if (task != null)
                {
                    state = task.State;
                    isReady = state == TaskState.Ready;
                }
                else
                {
                    WriteErrorToEventLog("Task not found", "TaskIsReady");
                    return isReady;
                }
The exception is thrown when the TaskService is instantiated in the using line.

One other piece of info: When I run this code on my dev box (Windows 7) the code works fine. When I run it on the production box (Windows Server 2008 R2) the error occurs.

So just to be clear:
  • When the target server was Windows Server 2008 R2, the code worked on both the Windows 7 and Windows Server 2008 R2 boxes.
  • Now that the target server is Windows Server 2008 R2, the code still works on Windows 7 but not on Windows Server 2008 R2.
Also, searching this site, I did find this thread about the same error (although slightly different situation) but unfortunately neither of the fixes suggested (forceV1 = true, Firewall settings) has resolve the issue for me.

Any help is appreciated.
Coordinator
Jun 4, 2014 at 5:12 PM
My guess is that the new server is not configured to allow remote task management. See the first portion of this article for info: http://technet.microsoft.com/en-us/library/cc766266.aspx
Marked as answer by dahall on 6/6/2014 at 8:00 AM
Jun 4, 2014 at 5:33 PM
Edited Jun 4, 2014 at 5:35 PM
dahall, thanks for the reply. Question, though: If that is the case, why am I able to run the code when calling from my dev box? I would think if the target computer wasn't configured correctly, it wouldn't matter what the calling computer was.

I'll check to make sure that the target computer is set up correctly, though, just in case.

EDIT: I stand corrected. Based on that article, the calling computer's OS does matter. OK. I'll look in to it.

Thanks again.
Jun 4, 2014 at 6:17 PM
Just wanted to update to confirm that this did fix the issue.

So thanks very much, dahall!

Hopefully if others run into this problem they will find this thread.