CoreWCF: Move WCF Services to .NET 10, gRPC or Web API
Server-side WCF never made it into .NET Core or modern .NET. CoreWCF, a Microsoft-supported port, runs existing WCF services on .NET 10 with the same contracts, so callers keep working. gRPC and Web API are the redesign options. Here is how to choose, and how the move works. // Same [ServiceContract], now hosted on .NET 10 var builder = WebApplication . CreateBuilder ( args ) ; builder . Services…
Windows Communication Foundation (WCF) was the standard way to build SOAP and TCP services on .NET Framework. However, when Microsoft developed .NET Core, the server side of WCF was not carried over. This led to the creation of a Microsoft-supported port called CoreWCF, which allows existing WCF services to run on .NET 10 with the same contracts, ensuring that callers continue to work.
There are two alternative options for redesigning WCF services: gRPC and ASP.NET Core Web API. The decision on which approach to take depends on who calls the service. If the callers cannot change, it is best to keep the contract and use CoreWCF. If the callers can change, a redesign to gRPC or Web API might be worth considering, as they offer faster and more compact communication for service-to-service traffic.
CoreWCF is an open-source, MIT-licensed project supported by the .NET Foundation and Microsoft. It publishes a support policy for its core packages, ensuring that CoreWCF will continue to receive updates as long as the underlying .NET platforms are supported. CoreWCF, gRPC, and ASP.NET Core Web API are the three options available for moving WCF services to .NET 10.
The process of migration involves inventorying all services, choosing the appropriate option based on caller control, checking and configuring bindings and security settings, hosting the existing contracts in an ASP.NET Core app, testing, and gradually replacing the service while maintaining a fallback to the .NET Framework version.
Rewritten by urgent.news; may contain errors — check the original.
Source: dev.to