WebService send message to clients
-
I'm a beginer in WebServices. I need to interact my WebService with a DataBase and the clients of the WebService. Because I'm the administrator of DB I need to send to WebClients, of the WebService, updated information on tables, datasets ... For this i need to known from my WebService Witch clients are connected at some time. How can i update clients information without they hask for none? thank's. Bruno Conde. ;)
-
I'm a beginer in WebServices. I need to interact my WebService with a DataBase and the clients of the WebService. Because I'm the administrator of DB I need to send to WebClients, of the WebService, updated information on tables, datasets ... For this i need to known from my WebService Witch clients are connected at some time. How can i update clients information without they hask for none? thank's. Bruno Conde. ;)
There are many articles covering web services, here on CP and on MSDN. Check out the articles posted here[^] on web services written in C#. - Nick Parker
My Blog | My Articles -
I'm a beginer in WebServices. I need to interact my WebService with a DataBase and the clients of the WebService. Because I'm the administrator of DB I need to send to WebClients, of the WebService, updated information on tables, datasets ... For this i need to known from my WebService Witch clients are connected at some time. How can i update clients information without they hask for none? thank's. Bruno Conde. ;)
Actually, that's not even possible. XML Web Services are invoked over HTTP, which is - by nature (and it's very protocol) - client request / server response driven. A server cannot contact a client; only a client can make requests on the server, in which case the server (should) respond. If you need a "net send" equivalent take a look at the .NET Remoting Overview[^]. You'll want to use a channel that is not HTTP-based, like the
TcpChannel
. The clients will still need to connect to the server (like a chat application), but they can stay connected and the .remoted object (on the remoting server) can send the connected clients data or even invoke requests on the client, instead of only the clients being able to invoke methods on the server. The .NET Framework 1.x provides theHttpChannel
andTcpChannel
, and 2.0 will add anIpcChannel
. Channels - like formatters - are extensible. Here on CodeProject someone even posted a channel using MSMQ (Microsoft Message Queue) server. Nifty. This posting is provided "AS IS" with no warranties, and confers no rights. Software Design Engineer Developer Division Sustained Engineering Microsoft [My Articles] [My Blog]