-1

I'm trying to connect a Web service SOAP12 using WCF and .NET Core 3.1.

I've generate the Reference.cs using WCF connected service from Visual Studio 2019 (v16.6.2). VS2019 generates the file but shows some warnings.

This img show the warnings

I tried build a custom binding but always throw same error.

var customBinding = new CustomBinding(encodingBindingElement)
        {
            Elements = { new HttpTransportBindingElement //or HttpsTransportBindingElement for https:
            {
                MaxBufferSize = int.MaxValue,
                MaxReceivedMessageSize = int.MaxValue,

            }}

        };

Already tried WSHttpBinding.

var binding = new WSHttpBinding(SecurityMode.TransportWithMessageCredential)
        {
            MaxBufferPoolSize = int.MaxValue,
            MaxReceivedMessageSize = int.MaxValue,

        };

has anyone managed to consume WCF SOAP12 with .NET Core 3.1 that can help me?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459

1 Answers1

1

This is a message security issue that is not yet supported by the .Net Core framework. This usually happens when the binding of the service endpoint contains elements (functions) that are not supported in .NET Core, such as certain security elements (message security). .net core 3.1 does not yet support SymmetricSecurityBindingElement.

.Net core only supports the following bindings: enter image description here

Ding Peng
  • 3,702
  • 1
  • 5
  • 8