Communicate with Topshelf windows service running on a server

1

I have a Topshelf windows service running on a Windows Server and I want to communicate with it, start and stop it from a remote client app, and try to resume some data from "MyService.cs" that is running.

I tryed to implement a socket server but I found two problems:

  1. If I implement the socket inside the MyService.cs, when I kill the app from remote, I loose the socket;
  2. If I implement the socket as a different app installed on the server, it's difficult to retrieve data from the windows service that is running.

I tryed also searching on Google and I found this question about Topshelf communication and this guide that shows how to setup socket server in Topshelf, but this isn't useful for me.

How can I communicate with a Topshelf Windows Service that is running on a server?

Mee

Posted 2019-01-21T13:35:30.467

Reputation: 11

No answers