0

So I plan to have a button on my GUI of my .NET Application which controls the service. I wanna stop the service when a button is pressed. I want to achieve this with an argument passed between the VB.NET application and the service. As far as I know, there are 4 available technologies in inter-process communication:

  1. .NET Remoting
  2. WCF Anonymous Pipes
  3. WCF Named Pipes
  4. Memory Mapped Files

What technology is the best one to implement those functionalities? As this is my first approach with IPC I thank you in advance for in-depth answers :)

SERRPA
  • 1
  • 2
  • 2
    Why so complicated? https://learn.microsoft.com/en-us/dotnet/api/system.serviceprocess.servicecontroller.stop?view=netframework-4.8 – MatSnow Mar 30 '20 at 08:23
  • We can't answer "best" questions on SO without an accurate definition of what "best" is to you. You should also bear in mind that after you've defined "best" it may clearly outline that any answers would be subjective, and the questions would be closed as off topic. – Caius Jard Mar 30 '20 at 09:56
  • There are many different ways of achieving IPC, even two programs writing to a file in a shared directory and each reading the file, is a form of IPC. Are your app and service always located on the same PC? – Caius Jard Mar 30 '20 at 09:59
  • Does this answer your question? [What is the best choice for .NET inter-process communication?](https://stackoverflow.com/questions/84855/what-is-the-best-choice-for-net-inter-process-communication) – MatSnow Mar 30 '20 at 12:16
  • Yes, they are always located on the same PC. – SERRPA Mar 30 '20 at 14:48
  • I actually think after all I've read, Anonymous Pipes might be the best choice, because my programs only act locally and are stored on the local machine. Performance- and workwise I think it's the best one, do you agree ? – SERRPA Mar 30 '20 at 14:50
  • What's wrong with @MatSnow suggestions? Why over complicate it? – Chris Dunaway Mar 30 '20 at 17:52
  • Actually forgot about it. Might be the best choice in this case. @Chris Dunaway – SERRPA Mar 31 '20 at 07:55

1 Answers1

0

According to @MatSnow 's comment under the original question the Service Controller might be the best choice for this problem.

ServiceController Class Stop Method

SERRPA
  • 1
  • 2