Image by Merio - from Pixabay

Here is how we consume a SOAP service in dotnet core.

Once you have a created a new web api project using Visual Studio. In Solution Explorer follow this, Connected Services–>Add Connected Service then fill the the Url and and space which will generate the required classes just like the SvcUtil.exe does.

var Uri = "";

BasicHttpBinding binding = new BasicHttpBinding();
EndpointAddress address = new EndpointAddress(Uri);

binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Ntlm;
binding.Security.Transport.ProxyCredentialType = HttpProxyCredentialType.None;

binding.Security.Mode = BasicHttpSecurityMode.TransportCredentialOnly;

soapClient soapClient = new soapClient(


– Image by Merio - from Pixabay