GetProcessByName / GetProcessByID Exception - Access Denied

  • Thread starter Thread starter Diego Quiroga
  • Start date Start date
D

Diego Quiroga

Hi,

We're currently working on an app to keep track of different processes (for
data operations) running in our server, started and monitored by the app.
We developed a "recovery procedure" for unexpected cases like power outages
which checks if one of our process is running:

Process[] procesos = System.Diagnostic.Process.GetProcessesByName(exeName);

sometimes it throws the "Access Denied" exception...

Documentation shows something about System.Security.SecurityPermission and
the asocciated enumeration PermissionState.Unrestricted
I played a little with that (creating a security object and makin an assert
without results).

Any help will be appreciated, thanks in advance.

Diego Quiroga
 
Back
Top