Menu

CoreWCF: Move WCF Services to .NET 10, gRPC or Web API
📰

CoreWCF: Move WCF Services to .NET 10, gRPC or Web API

DEV Community: csharp·.NET Developers India·8 days ago
#ckFLlRQn
#devtocsharp#devto#dev#corewcf#service
Long article (1154 words) — no AI summary yet.
Reading 0:00
15s threshold

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.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.