Quantcast
Channel: Task Scheduler Managed Wrapper
Viewing all articles
Browse latest Browse all 2206

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

$
0
0
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.

Viewing all articles
Browse latest Browse all 2206

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>