I'am trying to move my project from .net to .net core. I was initially using WCF WSHttpBinding service in .net but I'am unable to consume the same in .net core. I tried using BasicHttpBinding to connect with WsHttpBinding on the client side, but it throws an error saying the Bindings should match on both client and server side.
Suggest how to implement WSHttpBinding on .Net Core without modifying WSHttpBindings on the client side.?
Net Core does not support WSHttpBinding.
NET Core and . NET 5 support calling WCF services, but won't offer server-side support for hosting WCF. There are two recommended paths for modernizing WCF apps: gRPC is built on modern technologies and has emerged as the most popular choice across the developer community for RPC apps.
Defines a secure, reliable, interoperable HTTP binding suitable for non-duplex service contracts, which implements WS-Reliable Messaging and WS-Security.
NET Core platform. It provides a compatible implementation of SOAP, NetTCP, and WSDL. Usage in code is similar to WCF, but updated to use ASP.NET Core as the service host, and to work with .
I was able to make it work using a custom binding. There are also https, text, and binary binding elements that can be configured.
var binding = new CustomBinding
{
Elements = { new HttpTransportBindingElement //or HttpsTransportBindingElement for https:
{
MaxBufferSize = int.MaxValue,
MaxReceivedMessageSize = int.MaxValue
}}
};
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With