At work, I want to create a WCF Windows Service that runs on a network server. Then I want to create a WPF application that can be installed on various machines on the network. This WPF application needs to be able to communicate with the WCF Windows Service on the network server.
Is this feasible? Is there a better way to accomplish what I want to do? Does anyone know of any resources that show examples of this? I found some tutorials how to setup a WCF service within a Windows service, but I am unsure how to communicate with it over a network.
Thanks for any advice!
Yes, a WPF application can host a WCF client just as well as (and in the same way as) any other .NET application. You may run into security limitations if your application is packaged as an XBAP for browser delivery, but otherwise it should all just work.
Similarly, a Windows service can host a WCF service. For an example see ‘How to Host a WCF Service in a Managed Windows Service’ at http://msdn.microsoft.com/en-us/library/ms733069.aspx.
You can then communicate with it over the network by creating a client proxy — the easiest way to do this is to use the Visual Studio Add Service Reference command.