我们有一个提供商最近已更改为TLS 1.2
与此服务的通信是通过用vb.net编写的Web应用程序完成的。
用于处理以前的安全协议的代码。根据上的回答
WCF error The client certificate is not provided. Specify a client certificate in ClientCredentials
,我已经更新了代码,但是现在我收到一条错误消息:
The client certificate is not provided. Specify a client certificate in ClientCredentials.
我需要安装一个证书才能使此代码正常工作吗?如果需要,我该怎么做?
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)
上面的代码在vb.net中,但我假设答案在c中类似(或相同)。
谢谢!