HTTPS And VB.Net Apps

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • tomb

    #1

    HTTPS And VB.Net Apps

    Saeid Bagheri asked a very good question, and I've seen this question
    here before but I have never seen it answered. Can VB.Net desktop apps
    utilize https? If so, how?

    Tom
  • Mudhead

    #2
    Re: HTTPS And VB.Net Apps

    Free: http://www.mentalis.org/soft/projects/ssocket/
    Buy component: http://www.dart.com/powertcp/secure_environments.asp
    Specifications: http://wp.netscape.com/eng/ssl3/draft302.txt

    "tomb" <tomb@technetce nter.comwrote in message
    news:AmoFg.2162 8$q96.11432@big news4.bellsouth .net...
    Saeid Bagheri asked a very good question, and I've seen this question here
    before but I have never seen it answered. Can VB.Net desktop apps utilize
    https? If so, how?
    >
    Tom

    Comment

    • gene kelley

      #3
      Re: HTTPS And VB.Net Apps

      On Fri, 18 Aug 2006 15:18:00 -0400, tomb <tomb@technetce nter.comwrote:
      >Saeid Bagheri asked a very good question, and I've seen this question
      >here before but I have never seen it answered. Can VB.Net desktop apps
      >utilize https? If so, how?
      >
      >Tom
      I asked about this myself some weeks ago in the context of simply wanting to download selected files
      with HTTPS urls using WebClient. The current Help file talks about how to do this, but leads to an
      example that returns a warning/error that the method is obsolete. The current Help file (nor MSDN)
      had any example on how to use the suggested replacement method.

      For my particular needs, I eventually wound up with this relatively simple method:

      Imports System.Net.Secu rity
      Imports System.Security .Crytopgaphy.X5 09Certificates

      Try
      ServicePointMan ager.ServerCert ificateValidati onCallback = New _
      RemoteCertifica teValidationCal lback(AddressOf ValidateCertifi cate)

      WebClient1.Down loadDataAsync(u ri)

      Catch


      End Try

      Private Function ValidateCertifi cate(ByVal sender As Object, _
      ByVal certificate As X509Certificate , ByVal chain As X509Chain, _
      ByVal sslPolicyErrors As SslPolicyErrors ) As Boolean

      'Return True to force the certificate to be accepted.
      Return True
      End Function

      In the above snippet, when the URI contains HTTPS, the certificate is accepted (the user ceritficate
      dialog is not displayed) and the download preceeds. This works for my specific need in this case,
      but others may want user intereaction with the certificate dialog.

      Gene

      Comment

      • tomb

        #4
        Re: HTTPS And VB.Net Apps

        EXCELLENT!!!

        T

        gene kelley wrote:
        >On Fri, 18 Aug 2006 15:18:00 -0400, tomb <tomb@technetce nter.comwrote:
        >
        >
        >
        >>Saeid Bagheri asked a very good question, and I've seen this question
        >>here before but I have never seen it answered. Can VB.Net desktop apps
        >>utilize https? If so, how?
        >>
        >>Tom
        >>
        >>
        >
        >I asked about this myself some weeks ago in the context of simply wanting to download selected files
        >with HTTPS urls using WebClient. The current Help file talks about how to do this, but leads to an
        >example that returns a warning/error that the method is obsolete. The current Help file (nor MSDN)
        >had any example on how to use the suggested replacement method.
        >
        >For my particular needs, I eventually wound up with this relatively simple method:
        >
        >Imports System.Net.Secu rity
        >Imports System.Security .Crytopgaphy.X5 09Certificates
        >
        >Try
        >ServicePointMa nager.ServerCer tificateValidat ionCallback = New _
        >RemoteCertific ateValidationCa llback(AddressO f ValidateCertifi cate)
        >
        >WebClient1.Dow nloadDataAsync( uri)
        >
        >Catch
        >
        >
        >End Try
        >
        Private Function ValidateCertifi cate(ByVal sender As Object, _
        ByVal certificate As X509Certificate , ByVal chain As X509Chain, _
        ByVal sslPolicyErrors As SslPolicyErrors ) As Boolean
        >
        'Return True to force the certificate to be accepted.
        Return True
        End Function
        >
        >In the above snippet, when the URI contains HTTPS, the certificate is accepted (the user ceritficate
        >dialog is not displayed) and the download preceeds. This works for my specific need in this case,
        >but others may want user intereaction with the certificate dialog.
        >
        >Gene
        >
        >

        Comment

        Working...