Click here to Skip to main content
15,909,030 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
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

C#
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
Updated 5-Sep-12 1:21am
v3

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.
 
Share this answer
 
Comments
Wes101 5-Sep-12 7:51am    
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:53am    
So, remote connections were not allowed and now ok. Cool!
Pranav-BiTwiser 4-Jun-14 3:42am    
i started "remote registry" service on the remote pc but still i am getting same error

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900