C# Running program on remote computer

Need help with an engine or coding not on the list? Need help with a game or the website and forums here? Direct all questions here.

C# Running program on remote computer

Postby Xaos » Tue Dec 23, 2014 12:17 am

Hey guys. I'm looking for a way to run my console app in C# on one computer, but the actual program is ran on another computer. IE I open the file or hit "Run" in Visual Studio on computer1, the computer2 runs the program. I was looking online and found some stuff that may be applicable, but I didn't see a very clear answer.
User avatar
Xaos
 
Posts: 946
Joined: Tue Jan 10, 2012 11:01 pm
Location: Monroe, Georgia
Has thanked: 5 times
Been thanked: 8 times

Re: C# Running program on remote computer

Postby Jackolantern » Tue Dec 23, 2014 2:42 am

There are several different ways this can be done. You can either create a client/server setup and do it with sockets, or do it through RPC (Remote Procedure Call). There are still other ways to do it, such as integrating it into the web and using web services, etc., but it sounds like the first two options would be best.
The indelible lord of tl;dr
User avatar
Jackolantern
 
Posts: 10889
Joined: Wed Jul 01, 2009 6:00 pm
Location: Houston, TX
Has thanked: 22 times
Been thanked: 92 times
Blog: View Blog (1)

Re: C# Running program on remote computer

Postby Xaos » Tue Dec 23, 2014 2:54 am

Thanks, I'm going to look into those. Sockets look promising.
User avatar
Xaos
 
Posts: 946
Joined: Tue Jan 10, 2012 11:01 pm
Location: Monroe, Georgia
Has thanked: 5 times
Been thanked: 8 times

Re: C# Running program on remote computer

Postby Xaos » Tue Dec 23, 2014 9:28 pm

Follow up question. Say I finish the program, it has a nice GUI, etc. It's a desktop app or even a mobile app. I want the user to press "Go" on the GUI, it runs the program on a server/computer elsewhere. To accomplish this, would I just need to host the files on the computer/server, and then when someone pressed "Go" and called the program it would run the file on the server? Not sure how the dynamics of .Net works exactly, and in terms of the physical hardware it uses.
User avatar
Xaos
 
Posts: 946
Joined: Tue Jan 10, 2012 11:01 pm
Location: Monroe, Georgia
Has thanked: 5 times
Been thanked: 8 times

Re: C# Running program on remote computer

Postby Jackolantern » Wed Dec 24, 2014 12:13 pm

This would probably be best with a client/server setup. The client would have most of the program needed for running and displaying the interface. The server would have the logic needed to produce the data the client will display. Think like a webpage and the kind of code you need to have in Javascript for displaying the data, and the logic you need on the webserver for fulfilling AJAX requests to update the client display. It would be almost the same division, except instead of a webpage, you are using .NET desktop applications.
The indelible lord of tl;dr
User avatar
Jackolantern
 
Posts: 10889
Joined: Wed Jul 01, 2009 6:00 pm
Location: Houston, TX
Has thanked: 22 times
Been thanked: 92 times
Blog: View Blog (1)


Return to Advanced Help and Support

Who is online

Users browsing this forum: No registered users and 1 guest

cron

x