notify client from server
If I have an asp.net application, and I want to notify the user when something changes on the server, how do I do this. The same thing with a silverlight client. For the silverlight client is there som开发者_如何学Goe form of subscribing to an event on the server from the silverlight client?
There are 2 ways. The first one is to check your server every few minutes, but I believe that you do not search for this obvious way, you search for another technique that called comet.
Comet technique creates and opens connection to your server from the client, and when the server closes the connection, it means that there is a new message for your client, your client reads the messages, and opens a new connection waiting for the next message. The other way is to just open a connection and stream the data, when they are available from the server to the client, and not to close the connection at all. The only thing that you need to take care of is to increase the number of open connections that allowed to your site.
Check this sites for comet with asp.net
http://www.frozenmountain.com/websync/
or
http://www.aaronlerch.com/blog/2007/07/08/creating-comet-applications-with-aspnet/
精彩评论