|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Download a file from a secured Https ServerMy 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? On Thu, 18 May 2006 11:31:02 -0700, Nader Shahin
<NaderSha***@discussions.microsoft.com> wrote: Show quoteHide quote >I tried to develop an application to download a file from an Https server. I wrote an app in VB6 back in 2000 part of which deals with>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? 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 don't know if this helps
http://www.vbdotnetheaven.com/UploadFile/munnamax/PaymentGateway02152006022631AM/PaymentGateway.aspx Show quoteHide quote "gene kelley" <o***@by.me> wrote in message news:4udt62l9ill8tlr4afcgvosble2uvnldp3@4ax.com... > On Thu, 18 May 2006 11:31:02 -0700, Nader Shahin > <NaderSha***@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
Possible to set/reference a property 'dynamically'?
How to run scheduler for more than one time in a day Parse String in Quotes as without Quotes network programming with vb Error that I can't figure out Update ODBC DSN Properties in VB.NET Code? textbox currency free tutorials Localization VS 2005 - VB.net How to know the total pages to print?? |
|||||||||||||||||||||||