Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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!!!

like image 400
Barret Avatar asked Jul 18 '10 10:07

Barret


1 Answers

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

like image 58
Oliver Hanappi Avatar answered Oct 03 '22 19:10

Oliver Hanappi