I want to use JobObjectWrapper in my application to limit process memory. I'm trying to instatiate a JobObject with the following code:
JobObject job = new JobObject("Hello");
ProcessStartInfo ps = new ProcessStartInfo("notepad.exe");
job.CreateProcessSecured(ps);
but I'm getting the following exception:
Unhandled Exception: JobManagement.JobException: The management process is runni ng inside a Job, it will not be able to assign child processes to a new Job.
I'm also getting such exception when I try to run examples in the solution from codeplex(f.e. EndOfProcessMemory).
What am I doing wrong? Thanks in advance :)