locked
Web Service and Windows Service RRS feed

  • Question

  • Hello Everybody, I'm new here and I'm developing a web service that must communications to a windows service. I have read some forums and I see that there are three different ways to do that. 1. Data Base 2. WCF 3. Remoting Am I right? My web service will receive information and must send it to the windows service. Which options is the most suitable for my problem? Thanks
    • Moved by John Saunders Friday, November 12, 2010 8:19 PM wcf q (From:ASMX Web Services and XML Serialization)
    Thursday, November 11, 2010 6:56 PM

Answers

  • Actually if you only need to invoke operations defined in the Windows Service from your WCF service, you can make the Windows Service as the service and the WCF service as the client. If you need two way communication, please do as Rahul suggested.


    Lante, shanaolanxing This posting is provided "AS IS" with no warranties, and confers no rights.
    • Marked as answer by Yi-Lun Luo Monday, November 22, 2010 2:02 AM
    Tuesday, November 16, 2010 1:49 AM

All replies

  • Hello, if the WCF service and the Windows Service are hosted on the same machine, I recommend you to host a WCF service in your Windows Service using the NetNamedPipeBinding. This binding has very high performance. It uses named pipes under the hook. Of course this mean it can only be used for cross process communications on the same machine. If you need cross machine communication, you still need TCP or HTTP.
    Lante, shanaolanxing This posting is provided "AS IS" with no warranties, and confers no rights.
    Monday, November 15, 2010 9:11 AM
  • Hi Diego,

    As Yi-Lun Luo has pointed out you can go for any of the options.

    You can go through  How to choose the right binding here.

    The windows service will be acting as the client here for you service.If you want the service to notify the client(i.e push information) then you would have to use a feature called Callbacks in WCF.

    You can google on that and find more information.

     

    Feel free to ask if you need more help


    Please mark posts as answers/helpful if it answers your query. This would be helpful for others facing the same kind of problem
    Monday, November 15, 2010 10:25 AM
  • Actually if you only need to invoke operations defined in the Windows Service from your WCF service, you can make the Windows Service as the service and the WCF service as the client. If you need two way communication, please do as Rahul suggested.


    Lante, shanaolanxing This posting is provided "AS IS" with no warranties, and confers no rights.
    • Marked as answer by Yi-Lun Luo Monday, November 22, 2010 2:02 AM
    Tuesday, November 16, 2010 1:49 AM