This project has moved and is read-only. For the latest updates, please go here.

Error on TaskCollection Movenext Method on windows 2003

Topics: Errors
Aug 22, 2013 at 11:06 PM

i am new on Codeplex. I find your great library and i needed to deploy on a old windows 2003 sp2 server with .NET 3.0 only installed.

My program enum the task and write the name to a file, and do different action on each task. It seems that task named with a name like <name>.<something> are ignored. After a step in debug mode, it seems that when the name of the job finish with an extension the com interface raise an exception, if the .job after the .<something> is kept the com interface looks work fine.

I modify the MoveNext method to remove the folowing lines:
if (curItem.EndsWith(".job", StringComparison.InvariantCultureIgnoreCase))
curItem = curItem.Remove(curItem.Length - 4);

I think that the job's name didn't need to be parsed and remove the .job extension. It seem's that the com interface already do this work to return and activate task.

I test this modification on a windows 7 system, windows 2003 SP2 server and seems to work fine.
Aug 23, 2013 at 4:19 PM
That code should do nothing different if the task name does not end with ".job". On the 1.0 version of the COM library, Microsoft's implementation is inconsistent, thus the need for this code. Are you having a problem with the code, or just looking for ways to optimize it? If there is a problem, please describe the problem and the failure or exception you get.