0

i'm trying to make a chat application using c# that connects to a web server in order to check if there are messages available.

I've tried that by creating HttpWebRequest to check for messages every second, but i notice that it's not good for the server, imagine if there are thousands of users and each user sends an HttpWebRequest every second, that would be heavy.

I heard something about synchronous connection but i think it also sends the same number of HttpWebRequest, (i'm not sure about this part).

So please does any one know the right method for a chat application?

John Kilar
  • 65
  • 2
  • 11
  • 1
    Hello, check this topic: http://stackoverflow.com/questions/3226688/web-chat-application-asp-net-jabber-ajax-wcf-comet-reverseajax-issues-faced the guy with the answer got some great tutorial links. – Max Mar 17 '13 at 19:21
  • No one of the answers could work with my case. – John Kilar Mar 17 '13 at 19:32

2 Answers2

2

Perhaps SignalR might be useful in your case.

ASP.NET SignalR is a new library for ASP.NET developers that makes it incredibly simple to add real-time web functionality to your applications. What is "real-time web" functionality? It's the ability to have your server-side code push content to the connected clients as it happens, in real-time.

Actually the most typical tutorial using this technology is web chat.

Alexander Tsvetkov
  • 1,649
  • 14
  • 24