Consuming WCF Services in .NET 8 (.NET Core is no more!)

by DeeDee Walsh, on Jan 29, 2024 12:02:00 AM

Can you consume WCF services in .NET 8?

Yes! The good news is, consuming WCF services remains fully supported in .NET 8, building on the foundation established in .NET Core. You can reference WCF libraries directly and interact with existing WCF services seamlessly.

But wait, there's more:

The original limitations around WCF service configuration and authentication still apply, although some additional options have emerged:

    • Endpoint Behaviors: While app.config configuration isn't available, several methods exist for programmatic configuration in code. Consider using IServiceBehavior, custom IEndpointBehavior implementations, or builder configurations offered by CoreWCF (discussed later).
    • appsettings.json: While not directly supported for WCF behaviors, you can use it to store configuration data and access it within your custom behavior implementations.
    • Windows Identity Foundation (WIF): WIF still isn't supported, but JWT tokens offer a viable alternative for implementing secure communication. Both client and server code need to be adjusted accordingly.

Moving forward:

While gRPC remains a recommended alternative for new projects, migrating existing WCF services might not be the top priority. CoreWCF, an open-source project, actively maintains and improves WCF for .NET, including features like gRPC interoperability. This ongoing development makes WCF a viable option for the foreseeable future.

Resources:

Remember:

This content focuses on consuming WCF services in NET 8. Hosting WCF services within ASP.NET Core applications remains unsupported in .NET 8.

I hope this updated version provides a clearer picture of using WCF in the context of .NET 8. Please let me know if you have any questions!

Topics:.NETC#.NET Coreasp.net core.NET 8.NET 6

Comments

Subscribe to Mobilize.Net Blog

More...

More...
FREE CODE ASSESSMENT TOOL