GetProcessByName / GetProcessByID Exception - Access Denied

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top