I want to integrate NMVS protocol in my application which is providing wsdl files for testing which is written sample code in .net framework library.
I want to test
Here is a solution for your problem :
var transportSecurityBinding = new BasicHttpBinding();
transportSecurityBinding.Security.Mode = BasicHttpSecurityMode.Transport;
transportSecurityBinding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Certificate;
var customTransportSecurityBinding = new CustomBinding(transportSecurityBinding);
var textBindingElement = new TextMessageEncodingBindingElement
{
MessageVersion = MessageVersion.CreateVersion(EnvelopeVersion.Soap12, AddressingVersion.None)
};
// Replace text element to have Soap12 message version
customTransportSecurityBinding.Elements[0] = textBindingElement;