I want to make Asp.NET
Web Chat Application and found that Signalr
is best option for this. I found one sample Project with Long Polling
but it seems that it takes such a long time to send message or it just cancels it. I want to make speedy Chat app like Facebook
and Google
.
Please give me better way to go ahead.

- 91,630
- 14
- 92
- 150

- 5,568
- 15
- 62
- 111
-
8Why downvoted ? let me knw if i need to correct anything ? – Jeeten Parmar Aug 13 '15 at 12:13
1 Answers
The best thing about SignalR
is that you don't have to worry about Long Polling
and WebSockets
, but the framework itself deals with it.
When first launched, SignalR will try to use WebSockets
, because it is the newest and uses the least broadband. Then, it will fallback to Server Sent Events
, Forever Frame
and Long Polling
, all depending on the technology available on the server and on the client.
http://www.asp.net/signalr/overview/getting-started/introduction-to-signalr Here you have these concepts explained.
To sum things up, you shouldn't specify the framework which technology to use, but it should determine for itself (when dealing with each client - browser), depending on the available technology on the server and on the client.
Hope this helps! Good luck!

- 3,469
- 1
- 29
- 47
-
I am using `asp.net` not mvc. according to you, which one should be better ? I have many to many web app using `server send events` and 'long polling'. But I am looking for one to one chat and i have one sample project with 'long polling', which is not working. – Jeeten Parmar Aug 13 '15 at 11:44
-
2I will say it again, if you set a project to use SignalR, by default it will try to use WebSockets. If because of various reasons WebSockets are not available (because of the server or because of the client), it will try Server Sent Events, and so on. Of course, using WebSockets is recommended rather than using Long Polling, which is only used by SignalR as a last resort. Is my answer more clear now? – radu-matei Aug 13 '15 at 11:49
-
-
-
Is it working fine ? Actually, i dnt have enough time to learn everything right nw so i need any working sample.. – Jeeten Parmar Aug 21 '15 at 07:12
-
Yes, it does what it is supposed to do: public chat in public rooms, private chat with 2 users. But remember, it is only made as a tutorial and it is not in any way production ready. – radu-matei Aug 21 '15 at 07:14
-
Ohk, thank you. Let me check it out. I want it for unlimited private chat users that i will make it dynamically myself. – Jeeten Parmar Aug 21 '15 at 07:15