• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 887
  • Last Modified:

vb .net 2005 https download file.

vb .net 2005 looking for simple code to get a directory listing from https directory and download file(s)
0
mphillip85
Asked:
mphillip85
  • 4
  • 4
1 Solution
 
VBRocksCommented:
Here is an excerpt from another one of my posts on how to download a webpage.
http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/Q_22524893.html

Here you can actually enter the website that the XML data is on, it will download the page to your computer, then you can open the file and read it into a dataset:

        'Set our webpage (this is an actual webpage with XML data on it - go ahead and view it)
        Dim myWebPage As String = "http://www.w3schools.com/xml/guestbook.asp"

        'Set our temporary XML or HTML page that we will download to
        Dim myXMLPage As String = "c:\temp\myXMLpage.xml"

        'Download the webpage to our temporary XML file
        Dim webClient As New System.Net.WebClient
        webClient.DownloadFile(myWebPage, myXMLPage)


Hope that helps.

0
 
mphillip85Author Commented:
I do not want to download a webpage.  Sorry for not giving enough info.  I need to download files like ftp but using https to connect to a directory listing and download file from the directory.

Thanks
0
 
davecorunCommented:
If you want to download files, simply change the above code sample to place teh data into a Stream or Byte array to retrieve the files and write them.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
mphillip85Author Commented:
can you point to a sample or link that would help
0
 
davecorunCommented:
http://www.developerfusion.co.uk/show/4669/ is a good example of reading into a stream, and writing it to disk.
0
 
mphillip85Author Commented:
working now, but how do i send?
0
 
davecorunCommented:
What do you want to send?  I thought your question was how to download a file from an ftp server?
0
 
mphillip85Author Commented:
now I want to know how to upload a file, or do I need a new thread discussion for that?

thanks.
0
 
davecorunCommented:
That's a whole seperate topic.  It's related to what you have here, but you'll probably want to open another question.
0

Featured Post

Granular recovery for Microsoft Exchange

With Veeam Explorer for Microsoft Exchange you can choose the Exchange Servers and restore points you’re interested in, and Veeam Explorer will present the contents of those mailbox stores for browsing, searching and exporting.

  • 4
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now