vb System.ServiceModel.Security.X509ClientCertificateAuthentication.CustomCertificateValidator类(方法)实例源码

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

作者:VB.NET开发    项目:System.ServiceModel.Securit   
' Create a service host.
Dim httpUri As New Uri("http://localhost/Calculator")
Dim sh As New ServiceHost(GetType(Calculator), httpUri)

' Get a reference to the authentication object.
Dim myAuthProperties As X509ClientCertificateAuthentication = _
sh.Credentials.ClientCertificate.Authentication

' Configure custom certificate validation.
myAuthProperties.CertificateValidationMode = X509CertificateValidationMode.Custom
' Specify a custom certificate validator (not shown here) that inherits 
' from the X509CertificateValidator class.
' creds.ClientCertificate.Authentication.CustomCertificateValidator = _
'    new MyCertificateValidator()


问题


面经


文章

微信
公众号

扫码关注公众号