Aufruf eines Webservice, das über SSL und SelfSigned Certificates abgesichert ist


Imports System.Net
Imports System.Net.Security
Imports System.Security.Cryptography.X509Certificates

' Dummy function to skip validation and return OK
Public Function NoSSLValidation(ByVal sender As Object, _
ByVal certificate As X509Certificate, _
ByVal chain As X509Chain, _
ByVal sslPolicyErrors As SslPolicyErrors) As Boolean
NoSSLValidation = True
End Function

Public Function Main

' Set our dummy function as function for the validation
ServicePointManager.ServerCertificateValidationCallback = New RemoteCertificateValidationCallback(AddressOf NoSSLValidation)

End Function