Search code examples
wpfwindowsservicesystemtray

Windows Service with WPF management tool


i'm trying to create a windows service with C# in .net that runs before the user is logged on... then when a user is logged on a symbol should appear in the system tray (next to the clock) to show the user that the service is running.. by double clicking that symbol a configuration utility (written in wpf) should be shown to the user, so he can configure the service, read data from it and so on ..

is there a possibility to do this within one application?

thanks in advance for any help!!!


Solution

  • No, you can't do this with one application as services run with a different user in a different session. You need to create two applications and implement some communication between both.

    I would not recommend using named pipes directly (like Kieren Johnstone suggested), but to have a look at WCF which was designed for interprocess communication and nicely abstracts implementation details of the communication technology away from you. Here is a link that can propably help you with WCF: http://www.switchonthecode.com/tutorials/wcf-tutorial-basic-interprocess-communication.

    Best Regards,
    Oliver Hanappi