在Asp.net MVC4中实时聊天 [英] Live Chat in Asp.net MVC4

查看:131
本文介绍了在Asp.net MVC4中实时聊天的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我想使用MVC4在我的购物网站 iam中添加实时聊天功能。如果客户想要有关产品的任何信息,他/她可以与管理员聊天。只允许注册用户聊天。我不知道如何开始。

plz帮助我,

提前谢谢



i want to add live chat functionality in my shopping site iam using MVC4. if customer want any information about the product , he/she allowed to chat with Admin . Only registered users allowed to chat . i have no idea how to start.
plz help me,
Thanks in advance

推荐答案

使用信号R是个不错的选择。



参考



http://tech.pro/tutorial/1491/chat-application-with-signalr-and-aspnet-mvc-4 [< a href =http://tech.pro/tutorial/1491/chat-application-with-signalr-and-aspnet-mvc-4target =_ blanktitle =New Window> ^ ]



http://www.asp.net/signalr/overview/signalr-20/getting-started-with-signalr-20/tutorial-getting-始于信号员-20-and-mvc-5 [ ^ ]



http://code.msdn.microsoft.com/wpapps/Chat-Web - 应用 - 在-9a86 e594 [ ^ ]



希望这有助于你...
Using Signal R is a good option .

Refer

http://tech.pro/tutorial/1491/chat-application-with-signalr-and-aspnet-mvc-4[^]

http://www.asp.net/signalr/overview/signalr-20/getting-started-with-signalr-20/tutorial-getting-started-with-signalr-20-and-mvc-5[^]

http://code.msdn.microsoft.com/wpapps/Chat-Web-Application-in-9a86e594[^]

Hope this helps you ...


除了解决方案1:



请参阅推送技术的说明: http://en.wikipedia.org/wiki/Server_push [ ^ ]。



为什么传统的客户端 - 服务器模型和拉动技术主要在Web上使用对于像聊天这样的基本应用程序是不是很明显?客户端无法通知线程上的任何回复,并且必须对服务器端进行永久轮询,这太浪费了,同时响应不够。



SignalR是解决方案之一。请参阅:

http://en.wikipedia.org/wiki/SignalR [< a href =http://en.wikipedia.org/wiki/SignalRtarget =_ blanktitle =New Window> ^ ],

http://www.asp.net/signalr [ ^ ]。



如需更多解释,请参阅我过去的答案,更详细一点:网站帐户的应用程序'仪表板 [ ^ ]。



-SA
In addition to Solution 1:

Please see the explanation of push technology: http://en.wikipedia.org/wiki/Server_push[^].

Isn't that obvious why traditional client-server model and pull technology predominantly used on the Web is bad for such a basic application as a chat? The client side cannot have notification on any replies on the thread and would have to do permanent polling of the server side, which is too wasteful and not enough responsive at the same time.

SignalR is one of the workaround solutions. Please see:
http://en.wikipedia.org/wiki/SignalR[^],
http://www.asp.net/signalr[^].

For some more explanations, please see my past answer, more detailed one: Application 'dashboard' for website accounts[^].

—SA


请检查这可能对您有所帮助:



GitHub - saditya90 / SignalRChat:MVC4 SignalR Facebook Type Chat申请 [ ^ ]
Please check this it might help you:

GitHub - saditya90/SignalRChat: MVC4 SignalR Facebook Type Chat Application[^]


这篇关于在Asp.net MVC4中实时聊天的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆