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 . AddServiceModelServices ( ) ;
var app = builder . Build ( ) ; app . UseServiceModel ( sb => { sb . AddService < OrderService > ( ) ; sb . AddServiceEndpoint < OrderService , IOrderService > ( new BasicHttpBinding ( ) , "/OrderService.svc" ) ; } ) ; app . Run ( ) ;
Enter fullscreen mode
Exit fullscreen mode
What happened to WCF
Windows Communication Foundation (WCF) was the standard way to build SOAP and TCP services on .NET Framework. When Microsoft built .NET Core, and later .NET 5 through .NET 10, the server side of WCF was not carried over.…