vb System.ServiceModel.Security.X509CertificateInitiatorClientCredential.SetCertificate类(方法)实例源码

下面列出了vb System.ServiceModel.Security.X509CertificateInitiatorClientCredential.SetCertificate 类(方法)源码代码实例,从而了解它的用法。

作者:VB.NET开发    项目:System.ServiceModel.Securit   
' Create a WSHttpBinding and set its security properties. The
' security mode is Message, and the client is authenticated with 
' a certificate.
Dim ea As New EndpointAddress("http://contoso.com/")
Dim b As New WSHttpBinding()
b.Security.Mode = SecurityMode.Message
b.Security.Message.ClientCredentialType = MessageCredentialType.Certificate

' Create the client with the binding and EndpointAddress.
Dim cc As New CalculatorClient(b, ea)

' Set the client credential value to a valid certificate.
cc.ClientCredentials.ClientCertificate.SetCertificate( _
   StoreLocation.CurrentUser, _
   StoreName.TrustedPeople, _
   X509FindType.FindBySubjectName, _
   "client.com")


问题


面经


文章

微信
公众号

扫码关注公众号