Hello,
For some reason I cannot look at the processes running on one machine
on the network. I always get the following error:
System.InvalidOperationException: Couldn't get process information from
remote machine. ---> System.ComponentModel.Win32Exception: The network
path was not found
at System.Diagnostics.PerformanceMonitor.Init()
at System.Diagnostics.PerformanceMonitor..ctor(String machineName)
at
System.Diagnostics.PerformanceCounterLib.GetPerformanceData(String
item)
at System.Diagnostics.PerformanceCounterLib.get_CategoryTable()
at
System.Diagnostics.PerformanceCounterLib.GetPerformanceData(String[]
categories, Int32[] categoryIndexes)
at
System.Diagnostics.NtProcessManager.GetProcessInfos(PerformanceCounterLib
library)
--- End of inner exception stack trace ---
at
System.Diagnostics.NtProcessManager.GetProcessInfos(PerformanceCounterLib
library)
at System.Diagnostics.NtProcessManager.GetProcessInfos(String
machineName, Boolean isRemoteMachine)
at System.Diagnostics.ProcessManager.GetProcessInfos(String
machineName)
at System.Diagnostics.Process.GetProcesses(String machineName)
I don't understand how it can be telling me that the "The network path
was not found", because I can ping the machine, Map to it, Remote to it
etc.
Does anyone have any ideas as to what could be causing this machine to
be invisible to this function?
Thanks
Nick Hertl - 18 Oct 2005 23:02 GMT
It looks like if you don't have permission to know about the processes
on the remote machine you get this error. It could perhaps be a better
error message, but this is what it is.
Think about the situation. You can for example ping many external
websites that you don't own : "ping somewhere.com"
But if you try to find out about the processes running on that machine,
"Process.GetProcesses("somewherec.com")", you will this same exception.
If you want this to work properly, the user running the code on the
client must also have permission on the server to see the process
information.
XxLicherxX - 20 Oct 2005 14:08 GMT
Hi Nick,
Thanks for the response. I am not sure why I wouldn't have permission
to know about the process... I am (as the user on a client) running
this application under an account with administrator priveledges and
have also tried it using the administrator account. Also, I am not
trying to read processes on a server, I am trying to read processes on
another client machine. Would this make any difference?
Thanks
Dave
Willy Denoyette [MVP] - 21 Oct 2005 11:54 GMT
> Hi Nick,
>
[quoted text clipped - 8 lines]
>
> Dave
Running as Administrator on your machine doesn't mean you have
administrative rights on the client machine.
Willy.