简体   繁体   English

使用 .NET Core 在 Web API 中支持基于 WCF 肥皂的客户端

[英]Support WCF soap based clients inside web API with .NET Core

I have WCF application which I am trying to migrate to Web API with .NET core.我有 WCF 应用程序,我正在尝试将其迁移到带有 .NET 核心的 Web API。 Once I am done with migration I can ask clients to upgrade their apps to start using new REST endpoints and not to use WCF service.完成迁移后,我可以要求客户升级他们的应用程序以开始使用新的 REST 端点而不是使用 WCF 服务。 My only concern is that not all clients can migrate to new service at same time and I have to keep supporting both WCF and REST client until all clients migrated to use REST service.我唯一担心的是,并非所有客户端都可以同时迁移到新服务,我必须继续支持 WCF 和 REST 客户端,直到所有客户端都迁移到使用 REST 服务为止。 I also can not have old services running as it adds infrastructure cost.我也不能运行旧服务,因为它会增加基础设施成本。 Is there any way to support WCF clients in the same REST app ?有没有办法在同一个 REST 应用程序中支持 WCF 客户端? If the client don't migrate can they still address the service using old endpoint and old soap payload.如果客户端不迁移,他们是否仍然可以使用旧端点和旧肥皂负载来解决服务问题。

you can use a hosted service in .net core.您可以在 .net core 中使用托管服务。 In order to achieve that, you can add manually the ip:port/wcfinterface from the connected services (wcf web service reference provider) this is an additional tool, .net core is still supporting client side, you the way to call it is a little bit different.为了实现这一点,您可以从连接的服务(wcf web 服务引用提供者)手动添加 ip:port/wcfinterface 这是一个附加工具,.net core 仍然支持客户端,您调用它的方式是有点不同。 I have been using async methods with wcf and they work pretty fast.我一直在使用 wcf 的异步方法,它们工作得非常快。

https://docs.microsoft.com/en-us/dotnet/core/additional-tools/wcf-web-service-reference-guide https://docs.microsoft.com/en-us/dotnet/core/additional-tools/wcf-web-service-reference-guide

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

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