469,609 Members | 1,228 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,609 developers. It's quick & easy.

Download a file from a secured Https Server

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?

May 18 '06 #1
2 2448
On Thu, 18 May 2006 11:31:02 -0700, Nader Shahin
<Na*********@discussions.microsoft.com> wrote:
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
May 20 '06 #2
gs
don't know if this helps
http://www.vbdotnetheaven.com/Upload...ntGateway.aspx
"gene kelley" <ok**@by.me> wrote in message
news:4u********************************@4ax.com...
On Thu, 18 May 2006 11:31:02 -0700, Nader Shahin
<Na*********@discussions.microsoft.com> wrote:
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

May 20 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Ed Jaffe | last post: by
reply views Thread by Chuck Anderson | last post: by
2 posts views Thread by TJS | last post: by
4 posts views Thread by Nader Shahin | last post: by
3 posts views Thread by laredotornado | last post: by
reply views Thread by devrayhaan | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.