Dim URI As String = "FTP://ftpserverın"
Dim UserName As String = "<userid>"
Dim Password As String = "<userpsw>"
Dim WResp As FtpWebResponse
Dim Wreq As FtpWebRequest = DirectCast(FtpWebRequest.Create(URI & "/test.txt"), FtpWebRequest)
Try
Wreq.EnableSsl = True
Wreq.KeepAlive = True
Wreq.UsePassive = True
Wreq.Method = WebRequestMethods.Ftp.UploadFile
Wreq.Credentials = New System.Net.NetworkCredential(UserName, Password)
Dim bFile() As Byte = System.IO.File.ReadAllBytes("f:\ftpud.txt")
' dosya yükleme...
'Galiba burası güncelleme gelince vericeği hata :/
Dim clsStream As System.IO.Stream = Wreq.GetRequestStream()
clsStream.Write(bFile, 0, bFile.Length)
clsStream.Close()
clsStream.Dispose()
WResp = Wreq.GetResponse()
Catch ew As WebException
MsgBox(ew.Message)
Catch e As Exception
MsgBox(e.Message)
End Try