I am trying to consume a SOAP Service in .net core
I want to set the basic httpbinding with security mode as TransportWithMessageCredential
and clientcredentialType as Certificate
but I am getting an error
The value 'TransportWithMessageCredential' is not supported in this context for the binding security property 'securityMode'.
the code looks like this
var client = new SoapCustomClient();
var binding = new BasicHttpBinding(BasicHttpSecurityMode.TransportWithMessageCredential);
binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Certificate;
client.ClientCredentials.ClientCertificate.Certificate = certCollection[0];
Am I doing some serious mistake here? Any Solution for the same?
[I am able to achieve this in .net framework but not in .net core]