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 some form of subscribing to an event on the server from the silverlight client?

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

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/


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x