Click here to Skip to main content
15,889,992 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have an auto updater that is a window service in C#. and I also have auto updater client that is window application and that is used to display information to the end user if any application is opened and auto updater is doing an action on opened application.

Thanks in Advance.


Thanks & Regards,
Deepak Kumar

What I have tried:

I was thinking.

my client application is handshakes with service and then communicate either other.
and My client application is running with dedicated user account. and service is running with system account.
Posted
Updated 25-May-16 4:53am
Comments
Dave Kreskowiak 25-May-16 9:49am    
I have no idea what your question is. All we know is that you have a Windows Service and a second Windows Forms application that talks to it? So what's the problem?
Kornfeld Eliyahu Peter 25-May-16 10:03am    
Look for interactive windows service...
F-ES Sitecore 25-May-16 10:31am    
The usual way of doing this is for your service to listen for connections on a TCP/IP port and the client apps connect to that port (and the connection is accepted on a different port server-side so it can remain open for new connections). Once the client and server are connected they can exchange info between themselves as needed.

1 solution

You need to establish create full-duplex communication with the service, to receive push notification (updates) from the service. For that purpose, the service should have appropriate client-layer protocol. It looks like you need to implement publisher-subscriber model: first, your client application sends request to the service, and the service replies. To subscribe, the client part sends appropriate command to the service, with connection information; the service connects to client part (this particular client) and start sending notifications as new data is ready. Please see:
Duplex (telecommunications) — Wikipedia, the free encyclopedia[^],
Application layer — Wikipedia, the free encyclopedia[^],
Push technology — Wikipedia, the free encyclopedia[^],
see also my past answer: Application 'dashboard' for website accounts[^].

You can implement it on different levels, from raw sockets to WCF.
See also: Duplex Services[^].

These CodeProject article can be useful:
WCF Implementation of the Publisher/Subscriber Model[^],
Duplex Service in WCF[^],
A Beginner's Guide to Duplex WCF[^].

—SA
 
Share this answer
 
Comments
BillWoodruff 25-May-16 12:34pm    
+5

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900