Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / CLR / October 2005

Tip: Looking for answers? Try searching our database.

Problem with Diagnostics.Process.GetProcesses(String machineName)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
XxLicherxX - 06 Oct 2005 20:52 GMT
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.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.