Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Small C# conversion to VB.Net
Message
De
29/12/2014 20:38:42
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
Small C# conversion to VB.Net
Versions des environnements
Environment:
VB 9.0
OS:
Windows 8.1
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01612819
Message ID:
01612819
Vues:
42
I have this C# code:
    public class TrustAllCertificatePolicy : System.Net.ICertificatePolicy
    {
        public TrustAllCertificatePolicy()
        { }

        public bool CheckValidationResult(ServicePoint sp,
         System.Security.Cryptography.X509Certificates.X509Certificate cert, WebRequest req, int problem)
        {
            return true;
        }
    }
I have converted it to this:
Public Class TrustAllCertificatePolicy
    Implements System.Net.ICertificatePolicy

    Public Sub New()
    End Sub

    Public Function CheckValidationResult(sp As System.Net.ServicePoint, cert
     As System.Security.Cryptography.X509Certificates.X509Certificate, req As System.Net.WebRequest, problem As Integer) As Boolean
        Return True
    End Function

End Class
The Implements line gives this:

"Class 'TrustAllCertificatePolicy' must implement 'Function CheckValidationResult(srvPoint As ServicePoint, certificate As Security.Cryptography.X509Certificates.X509Certificate, request As WebRequest, certificateProblem As Integer) As Boolean' for interface 'System.Net.ICertificatePolicy'."

Not sure what has to be done here to complete this converstion.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform