noodles1
Programmer
- Oct 31, 2001
- 58
I have a Web Application (ASP) that launches instances of Excel & Winword and on occasion these processes do not terminate.
I am trying to write a house keeping scheduled task that will clean up these dormant processes if the process creation time is beyond a certain point. These processes are run under the same identity as the Web Application.
I have created the house keeper utility that uses GetProcessTimes to determine process age and then TerminateProcess to remove if the process meets age minimums.
Is is enough to run process terminator under the same identity as the Web App to be able to successfully use GetProcessTimes and TerminateProcess? If not, do I need to acquire security descriptors when getting the handle to the process for use by GetProcessTimes etc?
I have successfully tested the application interactively, however I am getting Error 5 conditions when running under production deployment. ie. Web app launched Excel etc. and scheduled task
I am trying to write a house keeping scheduled task that will clean up these dormant processes if the process creation time is beyond a certain point. These processes are run under the same identity as the Web Application.
I have created the house keeper utility that uses GetProcessTimes to determine process age and then TerminateProcess to remove if the process meets age minimums.
Is is enough to run process terminator under the same identity as the Web App to be able to successfully use GetProcessTimes and TerminateProcess? If not, do I need to acquire security descriptors when getting the handle to the process for use by GetProcessTimes etc?
I have successfully tested the application interactively, however I am getting Error 5 conditions when running under production deployment. ie. Web app launched Excel etc. and scheduled task