FTPWebRequest站点值

时间:2009-09-02 19:09:45

标签: vb.net ftp

如何在VB.net中的FTPWebRequest中设置站点值

在Chilkat,我们设置如下的值

Dim ftp As New Chilkat.Ftp2()
        Dim success As Boolean
 success = ftp.Site("lrecl=1000 recfm=fb cy pri=1 sec=1")

1 个答案:

答案 0 :(得分:0)

Dim request As FtpWebRequest = FtpWebRequest.Create("ftp://ftp.sunet.se/pub/www/Mosaic/Mosaic/Windows/README")
request.Credentials = New NetworkCredential("anonymous", "really")
request.Method = System.Net.WebRequestMethods.Ftp.DownloadFile
Dim response As FtpWebResponse = request.GetResponse()
Dim reader As New StreamReader(response.GetResponseStream()) 
Dim text As String = reader.ReadToEnd()
response.Close()
MessageBox.Show(text)