Communication with a running service

I wrote my first Windows service on .Net. Can I connect to this service from another .Net application? Can I execute methods for a service object from remote .net applications?

+4
source share
2 answers

WCF is definitely a .NET way. If you are not familiar with WCF, I would suggest starting with this video dnrTV: Keith Elder Demystifies WCF . This is a pretty decent job explaining how simple WCF is. For your situation, just start the WCF service in the OnStart () method of the Windows service. At this point, any remote application can connect to your WCF service hosted on your Windows service.

When you feel comfortable with WCF, you can check out this dnrTV: Extreme WCF video. This gives you some recommendations on how to "do" WCF inside Visual Studio.

To support these two videos, check out the Juval Lowy website, IDesign.net . Juval has many examples and useful WCF code that is freely available.

+5
source

Yes. A Windows service (or any other .NET program) may contain a WCF service. Customers can call this service to make requests.

+8
source

All Articles