When I try to create the TaskDefinition and see the XMlText of a System Task(SQM data sender)
'tk.Definition.XmlText' threw an exception of type __'System.OutOfMemoryException'__ exception.
exception base: "Insufficient memory to continue the execution of the program"
StackTrace:
at Microsoft.Win32.TaskScheduler.V2Interop.ITaskDefinition.get_XmlText()
at Microsoft.Win32.TaskScheduler.TaskDefinition.get_XmlText()
Code:
// Get the service on the local machine
TaskService ts = new TaskService(targetServer, userName, accountDomain, password);
__Note:__ The wrapper successfully created the Task Definitions of some 70 odd system tasks before failing at this one.
TaskName: SQM data sender
I am using the latest version of the wrapper.
Thanks in advance
Any help will be appreciated
Comments: ** Comment from web user: Karamveer **
'tk.Definition.XmlText' threw an exception of type __'System.OutOfMemoryException'__ exception.
exception base: "Insufficient memory to continue the execution of the program"
StackTrace:
at Microsoft.Win32.TaskScheduler.V2Interop.ITaskDefinition.get_XmlText()
at Microsoft.Win32.TaskScheduler.TaskDefinition.get_XmlText()
Code:
// Get the service on the local machine
TaskService ts = new TaskService(targetServer, userName, accountDomain, password);
__Note:__ The wrapper successfully created the Task Definitions of some 70 odd system tasks before failing at this one.
TaskName: SQM data sender
I am using the latest version of the wrapper.
Thanks in advance
Any help will be appreciated
Comments: ** Comment from web user: Karamveer **
@dahall: Thanks for the reply. I just wanted to know if this was thrown by the wrapper or by the base Microsoft library. I can just skip creating the task definitions of such tasks for the time being. This exception only occured for one particular (above mentioned) task and the rest are working fine.
Thanks again.