views:

84

answers:

3

Hi I wanna make a website preferably using asp.net 3.5 in c#. In this web app, I need to push messages very frequently. (like if sender sends a message, it should immediately reflect to the receivers). So more like chat application but not bidirectional. My question is how can i refresh receivers webpage immediately? or How can i push message to the receivers immediately?

any help is highly appreciated?

A: 

I'm guessing you're talking about features like Facebook Chat. According to various facebook dev blog posts, I believe they use ajax to make a long polled request; meaning as soon as one user sends a message, theres another ajax request made which isn't responded to by the server until there's something to report (i.e. a new message). This is often called "Comet".

Note: do NOT attempt to do this on a standard server setup - most server software starts a new thread for each request. You'll need custom server software to avoid this. Unfortunately, I've searched for hours in the past and can't find a definitive answer to which software accomplishes this best.

Shadow
Looks good. Thanks
A: 

You might consider using a Comet Look at the "implementation" section for some ideas.

Charles Ma
A: 

Hi,

I've recently published an opensource chatting application over at CodePlex. It takes inspiration from Google Talk as well as Facebook chat.

It uses XML to store messages and chat sessions etc.

Check it out @ http://aspnetjquerychat.codeplex.com/

Ali Kazmi
You could at least tailor your answers to the question asked instead of just cutting and pasting.
John Sheehan