Interaction between Windows service and desktop ap

2019-05-25 08:12发布

I am developing a project which consists of a Windows service and a Desktop Application in C#.

The job of the Service are to monitor a set of Folders for any changes, and log the information to DB Monitor a set of files and if changed replace with original versions (similar like Windows File Protection)

The Desktop Application is used for

  • Displaying the status of Service Function
  • In Debug Mode (to display the trace of activities performed by Service)
  • Configure Folders and Files

In this context, the major part is interaction between Service and the Desktop Application.

I have 2 choices 1. Remoting 2. WCF

Kindly suggest which is better and effective for my scenario, and how to trace in Debug Mode

1条回答
别忘想泡老子
2楼-- · 2019-05-25 08:57

I can't recommend any of your two choices, however I do recommend using Named Pipes, since this is the way of communication that I use in my Service - Application systems.

Check this SO answer for a quick example.

查看更多
登录 后发表回答