I have ASP.NET 4 Web Application that connects with SQL SERVER 2005/2008
I want to add a “chat” feature to my application users.
Supposing the feature will be built from scratch, what’s the best efficient reasonable approach:
- Using WCF web services with a Javascript timer every 3 seconds
- Using ASMX web services with a javascript timer every 3 seconds
- Using AJAX control from ASP.NET (Update Panel) and do a partial Post Back depending on an ASP.NET timer (server side) every 3 seconds.
- Sending requests from the database to the application telling him to refresh himself when a new message is there (I don’t have an idea about this approach but I think the technology exists, but I don’t even know its name)
- Some JQuery AJAX technologies that are outside Microsoft AJAX .NET Framework. these technologies should be able to communicate with SQL Server and be compatible with ASP.NET (Not PHP). I’m not sure about this approach.
- Any other approaches or opinions.
Supposing the feature will be built depending on a previously implemented library. what are possible libraries that are totally customized and so likely to be open source. If the library will save 25% of the work time so that will be great, but I can’t use a hidden code (blind DLL) if it’s pretty critical even if it saves 80% of the work time.
Thanks,
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
You should look at SignalR – which is pretty good and less configuration required for it.
SignalR Project – http://signalr.net/
SignalR, Simple Implementation – http://rizwanahmed.net/?p=227
If you have more questions let me know…
Thanks,
Riz
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