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:
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:
Any help is appreciated.
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.
Any help is appreciated.