0

We have a provider who has recently changed to TLS 1.2

The communication with this service is done through a web app written in VB.NET

The code used to work with the previous security protocol. According to answer on WCF error The client certificate is not provided. Specify a client certificate in ClientCredentials, I have updated the code, however now I get an error message:

The client certificate is not provided. Specify a client certificate in ClientCredentials.

Do I need to install a certificate in order for this code to work and if so, how do I do that?

Dim binding = New BasicHttpBinding()
binding.Name = "SoapBinding"

binding.Security.Mode = BasicHttpSecurityMode.Transport

binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Certificate
binding.Security.Transport.ProxyCredentialType = HttpProxyCredentialType.None
binding.Security.Transport.Realm = ""
binding.Security.Message.ClientCredentialType = BasicHttpMessageCredentialType.Certificate

Dim NewEndPoint As New EndpointAddress("www.example.com")

Dim _sr As New srT.ConsumerSoapClient(binding, NewEndPoint)

Dim NewSendData As New srT.SomeService

Dim _result As New srT.SomeServiceRepsonse

_result = _sr.ProcessRequest(NewSendData)

The above code is in VB.NET but I'm assuming the answer would be similar (or the same) in C#.

Thanks!

Daniel Gee
  • 426
  • 7
  • 21
  • `The communication with this service is done through a web app written in VB.NET`, in what asp.net, wcf, etc? Sounds like you need to look into X.509 certificates... – Trevor Oct 15 '18 at 03:58
  • The application is written in ASP.NET. Do I need to install a certificate first? If so, where would I find that certificate? – Daniel Gee Oct 15 '18 at 04:07

1 Answers1

0

I changed the following code and then didn't need the certificate (using .NET 4.6.1):

binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.**None**
Daniel Gee
  • 426
  • 7
  • 21