Click here to Skip to main content
Sign Up to vote bad
good
See more: C#
hi all, having abit of a problem getting processors from a remote pc, the code works for my local machine but soon as I add in the remote PC's IP an exception is thrown "Couldn't connect to remote machine"
 
code is as follows
 
private void btnGetProcess_Click(object sender, EventArgs e)
        {
            Process[] processlist = Process.GetProcesses("machine ip");
            foreach (Process p in processlist)
            {
                listBox1.Items.Add(p.ProcessName);
            }
        }
help would be appreciated
thanks alot
wes
Posted 5 Sep '12 - 1:20
Wes101381
Edited 5 Sep '12 - 1:21


1 solution

"Couldn't connect to remote machine"
Error states that you don't have proper access permissions in place to connect and access it's processes. You need to make sure security privileges are in place and firewall issues are not there. Remote PC/server should allow remote connections.
  Permalink  
Comments
Wes101 - 5 Sep '12 - 7:51
thanks, I found out that the "remote registry" service wasnt running on the remote pc, but thanks for the help apprciated
Sandeep Mewara - 5 Sep '12 - 7:53
So, remote connections were not allowed and now ok. Cool!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 OriginalGriff 266
1 Mohammed Hameed 183
2 Sergey Alexandrovich Kryukov 143
3 Santhosh G_ 108
4 CPallini 96
0 Sergey Alexandrovich Kryukov 8,266
1 OriginalGriff 6,306
2 CPallini 3,528
3 Rohan Leuva 2,703
4 Maciej Los 2,234


Advertise | Privacy | Mobile
Web03 | 2.6.130516.1 | Last Updated 5 Sep 2012
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid