For Programmers: Free Programming Magazines  


Home > Archive > C# > June 2004 > GetProcessByName / GetProcessByID Exception - Access Denied









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author GetProcessByName / GetProcessByID Exception - Access Denied
Diego Quiroga

2004-06-03, 7:31 pm

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
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com