How to connect to a remote windows service
-
Hello, I have multiple clients, each one of them running windows service, How can I connect to that windows service and pass data to it ? I'm using signalR so I will pass the data from it's HUB Thanks in advance
JusT LeT YouR MinD WorK
-
Hello, I have multiple clients, each one of them running windows service, How can I connect to that windows service and pass data to it ? I'm using signalR so I will pass the data from it's HUB Thanks in advance
JusT LeT YouR MinD WorK
The service needs to provide a useable interface that allows you to communicate with it. Most listen on a specific port for specifically formatted commands to be sent to it over TCP/IP. You can host something like WCF inside your service to make things simpler.
-
Hello, I have multiple clients, each one of them running windows service, How can I connect to that windows service and pass data to it ? I'm using signalR so I will pass the data from it's HUB Thanks in advance
JusT LeT YouR MinD WorK
Quote:
I'm using signalR so I will pass the data from it's HUB
Since you are using SignalR, you do not require to connect to the Windows Service at all, just connect to the SignalR and let it do the work for you. Chances are you are using ASP.NET based SignalR (not the latest Core technologies), then you would have a good integration with Windows Service as well as the underlying system. Just make sure each of those machines are connected to the SignalR, so that there can a communication relay. Check this out for more on the topic, [SignalR with Self-hosted Windows Service](https://www.codeproject.com/Articles/881511/SignalR-with-Self-hosted-Windows-Service)
The shit I complain about It's like there ain't a cloud in the sky and it's raining out - Eminem ~! Firewall !~
-
Quote:
I'm using signalR so I will pass the data from it's HUB
Since you are using SignalR, you do not require to connect to the Windows Service at all, just connect to the SignalR and let it do the work for you. Chances are you are using ASP.NET based SignalR (not the latest Core technologies), then you would have a good integration with Windows Service as well as the underlying system. Just make sure each of those machines are connected to the SignalR, so that there can a communication relay. Check this out for more on the topic, [SignalR with Self-hosted Windows Service](https://www.codeproject.com/Articles/881511/SignalR-with-Self-hosted-Windows-Service)
The shit I complain about It's like there ain't a cloud in the sky and it's raining out - Eminem ~! Firewall !~
I thought the same but if I kept the client (Windows Service) connected to the signalR hub how can I receive the message ? since I don't have any page or GUI
JusT LeT YouR MinD WorK
-
I thought the same but if I kept the client (Windows Service) connected to the signalR hub how can I receive the message ? since I don't have any page or GUI
JusT LeT YouR MinD WorK
Quote:
how can I receive the message ?
You _will_ receive the message, you will just not see the message. That is the basic concept of a Windows Service. They are UI-less, because of their design. If you want to see the message in real-time, then either use a UI-based framework, or consider reading the messages from an external source, such as a Queue that processes the messages as they come. [Queuing Windows Services work items using MSMQ, and live progress using WCF Net Named Pipe](https://www.codeproject.com/Articles/846586/Queuing-Windows-Services-work-items-using-MSMQ-and)
The shit I complain about It's like there ain't a cloud in the sky and it's raining out - Eminem ~! Firewall !~