Download a file from a secured Https Server

G

Guest

I tried to develop an application to download a file from an Https server.
My application was able to download a file from a regural Http server.

I used a WebProxy and i passed the NetworkCredential, but also it didn't
work like:-
Dim myProxy As New WebProxy("https://TheServername.com/", 443)

Also I used that way to create a class to accept all kinds of
certifications, and also it didn't work.

Public Class acceptAllCerts
Implements System.Net.ICertificatePolicy
Public Function CheckValidationResult(ByVal srvPoint As ServicePoint, _
ByVal cert As X509Certificate, ByVal request As WebRequest, ByVal
problem As Integer) _
As Boolean Implements ICertificatePolicy.CheckValidationResult
Return True
End Function
End Class

The message I am receiving is "The ServicePointManager does not support
proxies of https scheme."

Does anyone have any idea how to solve this?
Does anyone have any valid script to download a file from a secured Https
server?
 
G

gene kelley

I tried to develop an application to download a file from an Https server.
My application was able to download a file from a regural Http server.

I used a WebProxy and i passed the NetworkCredential, but also it didn't
work like:-
Dim myProxy As New WebProxy("https://TheServername.com/", 443)

Also I used that way to create a class to accept all kinds of
certifications, and also it didn't work.

Public Class acceptAllCerts
Implements System.Net.ICertificatePolicy
Public Function CheckValidationResult(ByVal srvPoint As ServicePoint, _
ByVal cert As X509Certificate, ByVal request As WebRequest, ByVal
problem As Integer) _
As Boolean Implements ICertificatePolicy.CheckValidationResult
Return True
End Function
End Class

The message I am receiving is "The ServicePointManager does not support
proxies of https scheme."

Does anyone have any idea how to solve this?
Does anyone have any valid script to download a file from a secured Https
server?

I wrote an app in VB6 back in 2000 part of which deals with
downloading weather images from the web. Some images require
credentials (user, password) and a few are on SSL sites (https:).
At that time I found a complete example on MSDN which showed how to
handle credentials when required and the SSL (https:) downloads using
the WinInet library. I rewrote this app a few months ago in VB2005.
Although WebClient works fine for the normal http requests, I never
could make it work for requests requiring credentials and found no
info on how to handle https. So, I wound up reworking/converting that
old example to work in VB2005 (works OK).

That particular example link and most others from that era are no
longer found on MSDN. However, you can find info, there, on WinInet.
It looks like that old example code is there, but in bits and pieces.

Gene
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top