GetProcessesByName() returns "Access is Denied" when trying to access remote host.

D

Dave

Hi -

I have an application that is monitoring a process on another machine.
This application runs as a service. The error that I am getting when
this runs is:

Couldn't get process information from remote machine.
System.ComponentModel.Win32Exception: Access is denied

I have searched the web extensively to solve my problem, but have found
nothing. I find a lot of people finding errors when using asp.net to
get a process, but thats not what I'm trying to do. Specifically, here
is the code that fails:

Process[] aryProcess =
System.Diagnostics.Process.GetProcessesByName(processName, serverName);

I know that there is an issue with permissions and that you have to
have administrator rights. I set the properties of my service to log
on under the administrators account. The service is running on Windows
Server 2003. The remote server is Windows 2000.

If anyone has any ideas of what I need to do to get this to work, I
appreciate it!!
 

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