Allow IIS App pool identity to read foreign process start info

60 Views Asked by At

Is there a way to grant permissions to the app pool identity to read Process.StartTime. It seems to be limited to access this information only for its own process or for processes it spawned.

My core problem is that I store a process ID but if another process takes its place it causes an issue where I am checking the wrong process. I avoided using the process name in conjunction with PID since it's susceptible to the same problem (only less likely) and thought that StartTime would be a great way of uniquely identifying the process. Unfortunately as I run this from an w3wp worker when I query the process info for the wrong process i get a Win32Exception with the text "Access is denied.".

0

There are 0 best solutions below