Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Small C# conversion to VB.Net
Message
From
29/12/2014 20:38:42
 
 
To
All
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Title:
Small C# conversion to VB.Net
Environment versions
Environment:
VB 9.0
OS:
Windows 8.1
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01612819
Message ID:
01612819
Views:
43
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
Next
Reply
Map
View

Click here to load this message in the networking platform