What replaces WCF in .Net Core?

后端 未结 9 538
逝去的感伤
逝去的感伤 2020-11-30 19:27

I am used to creating a .Net Framework console application and exposing a Add(int x, int y) function via a WCF service from scratch with Class Library (.Net Fra

9条回答
  •  生来不讨喜
    2020-11-30 19:52

    WCF does many things; it is an easy way to remote procedure calls between two applications (processes) on one machine, using named pipes; it can be a high volume internal client-server communication channel between .NET components, using binary serialization over TCPIP; or it can provide a standardised cross-technology API, e.g. via SOAP. It even has support for things like asynchronous messaging, via MSMQ.

    For .NET Core, there are different replacements based on the purpose.

    For cross-platform API, you would replace this with a REST service using ASP.NET.

    For inter-process connections, or client-server connection, gRPC would be good, with an excellent answer given by @Gopi.

    So the answer to "What replaces WCF" depends on what you are using it for.

提交回复
热议问题