[英]Can we use wcf WsDualHttpBinding(DUPLEX comm) for communicating between two different websites in asp.net
I want to make duplex communication
( CHAT like application ) between two different websites in asp.net. 我想在asp.net中的两个不同网站之间进行
duplex communication
( 像CHAT这样的应用程序 )。 I have seen lot of demos of duplex communication with two windows application (nettcpbinding) binding. 我已经看到了很多带有两个Windows应用程序(nettcpbinding)绑定的双工通信的演示。
But I want to achieve this with two websites. 但我想通过两个网站实现这一目标。 Can it be achieved?
可以实现吗?
It doesn't make any difference, just as you create a winforms app that has a reference to a WCF service, you can add a reference to your WCF service from your ASP.NET project as well. 这没有什么区别,就像您创建一个具有对WCF服务的引用的Winforms应用程序一样,您也可以从ASP.NET项目中添加对WCF服务的引用。
However, if you want to make a chat like application (generally, any real-time communication with your web users), I recommend taking a look at SignalR . 但是,如果您想进行类似聊天的应用程序(通常是与Web用户的任何实时通信),我建议您看一下SignalR 。
Update: 更新:
If you're insisting on using WCF for implementing this, take a look at this CodeProject article which explains exactly what you're trying to achieve. 如果您坚持要使用WCF来实现此目的,请查看此CodeProject文章 ,其中准确地解释了您要实现的目标。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.