tags:

views:

129

answers:

1

Hi, How do you set Site values in FTPWebRequest in VB.net

In Chilkat we set values like below

Dim ftp As New Chilkat.Ftp2()
        Dim success As Boolean
 success = ftp.Site("lrecl=1000 recfm=fb cy pri=1 sec=1")
A: 
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)
Jonas Elfström
Thanks Jonas. But where do I specify the Site values??
Sorry, I misunderstood. It's not possible to send the SITE command with FtpWebRequest.
Jonas Elfström