Can I use WCF in .NET Core 3.1 or .NET5

MS did a great effort to move most of the .NET Framework to .NET Core, but not all of them are available.

What about WCF ? Can you use WCF in .NET Core 3.1 or .NET5?

Well it depends. You cannot “host” or have a ASP.NET Core app that implements a WCF service, but you can “consume” WCF services.

The WCF libraries can be found in github.

But… take into considerations that some aspects of WCF are not supported in .NET Core:

The WCF Client Libraries for .Net Core do not support configuration of Endpoint Behaviors using App.Config, you must implement it in code. Can you put your configuration inside an appsettings.json file. Well not out of the box. This guy did something very close. But you can look at the MS Documentation on how to config your services with code.

Windows Identity Foundation (WIF) is not supported in WCF for .NET Core but… you can use JWT tokens to kind of support it. You will need to configure them both in your client and in your backend code. 

And what about moving on? The recommendation is to move WCF to gRPC. But that is material for another post, a longer one. But in case you are interested this is nice performance comparison between WCF, REST API and gRPC

Flatlogic Admin Templates banner

Leave a Reply

Your email address will not be published. Required fields are marked *