简体   繁体   English

在同一Service Fabric可靠服务中同时使用WCF服务和Web Api

[英]Use both WCF service and Web Api in same Service fabric reliable services

I haven't had much luck finding a way of using the WCFCommunicationListener as well as HttpListner(OwinCommunicationListner) inside same Reliable service. 我没有太多运气找到在同一Reliable服务中使用WCFCommunicationListener以及HttpListner(OwinCommunicationListner)的方法。 I Want to use two different listeners one that provide the Soap functionality that I can achieve using WCFCommunicationListener and other will simple Web Api consumption that what pretty much OwinCommunicationListner provides. 我想使用两种不同的侦听器,一种提供使用WCFCommunicationListener可以实现的Soap功能,另一种侦听器提供OwinCommunicationListner几乎提供的简单Web Api使用。 I don't want to use the WcfCommunicationListener for my REST functionalities, I want to consume my REST apis as Web Api. 我不想将WcfCommunicationListener用于我的REST功能,我想将REST api用作Web Api。

I will run two of them on two separated services. 我将在两个单独的服务上运行其中的两个。 Using Docker for WCF and Owin for Web API. 使用Docker for WCF和Owin for Web API。 If the problem you have is trying to share code then just have a shared library outside of the two services. 如果您遇到的问题是尝试共享代码,则只需在两个服务之外使用一个共享库即可。

An sample on WCF on Docker here https://blogs.msdn.microsoft.com/webdev/2017/02/20/lets-try-wcf-self-hosted-services-in-a-container/ Docker上的WCF示例,请参见https://blogs.msdn.microsoft.com/webdev/2017/02/20/lets-try-wcf-self-hosted-services-in-a-container/

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

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