简体   繁体   English

从 ASP.NET 核心 Web Z72664DC0959F3B0C04891F8F7C 消费 WCF 双工服务

[英]Consuming WCF Duplex Service from ASP.NET Core Web Api

I have a WCF duplex service that sends messages to several clients.我有一个向多个客户端发送消息的 WCF 双工服务。 This part is working good but the thing I need to do is starting the process from an ASP.NET Core Web API.这部分运行良好,但我需要做的是从 ASP.NET 核心 Web API 开始该过程。

I have a UI that is using this API and when the user submits the form in UI the API needs to call the WCF duplex service and this service will distribute the related data to clients who are connected to this service.我有一个使用此 API 的 UI,当用户在 UI 中提交表单时,API 需要调用 WCF 双工服务,此服务会将相关数据分发给连接到此服务的客户端。 Since I can't use WSDualHttpBinding class in ASP.NET Core because of the System.ServiceModel v4.2.由于System.ServiceModel v4.2,我无法在 ASP.NET 核心中使用WSDualHttpBinding class。

The real question is how can I trigger the process (WCF duplex) from ASP.NET Core?真正的问题是如何从 ASP.NET 内核触发进程(WCF 双工)? I don't need to create a channel between ASP.NET Core and WCF duplex since I don't need a callback in the ASP.NET Core project.我不需要在 ASP.NET 核心和 WCF 双工之间创建通道,因为我不需要在 ASP.NET 核心项目中进行回调。

Thanks谢谢

There is no WCF implementation in .net core. .net 内核中没有 WCF 实现。 If you have started development from scratch on net core, then start working through web sockets.如果您已经在 net core 上从头开始开发,那么从 web sockets 开始工作。 In this case, you can save duplex communication.在这种情况下,您可以节省双工通信。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM