Click here to Skip to main content
15,888,286 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
Hi,
I have problem that, I want my wcf service make call to client when some action performed or criteria matched, Also I don't want to use dual HTTP, Because as per knowledge Dual HTTP work on connected mode with server and I don't want that my server handle unnecessary connection if its not required,
So I request to all of you please suggest me what can I do.

Thanks in advance.
Posted

If client is not connected to the server, it means that the client is unknown to the server, virtually does not exist. In this case, requiring HTTP server to "call" the client (what is that, by the way? :-)) would mean to contradict yourself.

HTTP itself is one the asymmetric (client-server) stateless protocol. It's based on pure pull technology. The clients connect to the HTTP server (not visa versa), because they "know" the IP address and port to connect to. There is nothing like that to allow the HTTP server to connect to client (even if the server was designed to do so). And what you need looks like server push. Please see:
http://en.wikipedia.org/wiki/Pull_technology[^],
http://en.wikipedia.org/wiki/Server_push[^],
http://msdn.microsoft.com/en-us/library/ms751522.aspx[^].

[EDIT]

Pay attention for the SignalR technology: http://www.asp.net/signalr/overview/getting-started/introduction-to-signalr[^].
http:/ASP.NET tells us:
Real-time web functionality is the ability to have server code push content to connected clients instantly as it becomes available, rather than having the server wait for a client to request new data.
Pay special attention: to connected clients.

—SA
 
Share this answer
 
v2
Comments
abhishek_singh 13-Aug-13 2:25am    
Hi Sergey,
Thanks for reply,
I agree with all of your opinion but this is my issue regarding how server can send information when client disconnected.
Actually I have some file generation at server end and it may generate anytime So I don't want that client always ping to server and get that file, Actually I want that if server have file comes than server automatically send that file to client.
Sergey Alexandrovich Kryukov 13-Aug-13 2:38am    
Why would you worry about client pinging to server? The client has server's IP address and port and simply tries to connect; and the server is usually responsible for good uptime...

There are two things: send from server to client on request (pull technology), and send something to the client triggered by some event internal to the server (push technology). In second case, you need server push. No matter how you implement it, you cannot require disconnection from the client...

—SA
Sergey Alexandrovich Kryukov 13-Aug-13 2:46am    
Please see the update to my answer, after [EDIT].
—SA
I am going to solve my issue with MSMQ binding in WCf services, B'cos i think it is good, reliable and secure option for my problem
 
Share this answer
 

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