|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
HTTPS And VB.Net AppsSaeid 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 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 Show quoteHide quote "tomb" <t***@technetcenter.com> wrote in message news:AmoFg.21628$q96.11432@bignews4.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 On Fri, 18 Aug 2006 15:18:00 -0400, tomb <t***@technetcenter.com> wrote:
>Saeid Bagheri asked a very good question, and I've seen this question I asked about this myself some weeks ago in the context of simply wanting to download selected files>here before but I have never seen it answered. Can VB.Net desktop apps >utilize https? If so, how? > >Tom 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.Security Imports System.Security.Crytopgaphy.X509Certificates Try ServicePointManager.ServerCertificateValidationCallback = New _ RemoteCertificateValidationCallback(AddressOf ValidateCertificate) WebClient1.DownloadDataAsync(uri) Catch End Try Private Function ValidateCertificate(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 EXCELLENT!!!
T gene kelley wrote: Show quoteHide quote >On Fri, 18 Aug 2006 15:18:00 -0400, tomb <t***@technetcenter.com> wrote: > > > >>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.Security >Imports System.Security.Crytopgaphy.X509Certificates > >Try >ServicePointManager.ServerCertificateValidationCallback = New _ >RemoteCertificateValidationCallback(AddressOf ValidateCertificate) > >WebClient1.DownloadDataAsync(uri) > >Catch > > >End Try > > Private Function ValidateCertificate(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 > >
Late Binding Issue
VB Net and ADOX string reset? why? how? Decimal Degrees to DMS Need some advice? What is the .NET way? - Right("0" & Now.Month.ToString, 2) Concurrency violation: the DeleteCommand affected 0 records vb.net Redrawing a part of a control VB 2005 Visual Styles problem Web Service using stored procedures example? |
|||||||||||||||||||||||