hi, ive tried two ways of accessing an FTP server and neither worked. both
threw an error saying "User Not Logged In"....so i have no idea how to do
this....heres the code
My.Computer.Net work.UploadFile ("FileName", "ftp://name.MyServer.n et",
"UserName", "Password")
and
Dim c As New Net.NetworkCred ential
Dim snd As Net.FtpWebReque st
c.UserName = Me.txtUser.Text
c.Password = Me.mtxtPass.Tex t
For Each obj As Object In Me.lstAddedFile s.Items
Dim tmp As String = obj.ToString
Dim state As New FtpState
snd = WebRequest.Crea te(New Uri(Me.txtWebSi te.Text.Trim & "/" &
tmp.Substring(t mp.LastIndexOf( "\") + 1)))
snd.Credentials = c
snd.UseBinary = True
snd.Method = Net.WebRequestM ethods.Ftp.Uplo adFile
state.FileName = obj.ToString()
state.snd = snd
snd.BeginGetReq uestStream(Addr essOf FtpFileUploadCa llBack, state)
Next
any help would be great
--
-iwdu15
threw an error saying "User Not Logged In"....so i have no idea how to do
this....heres the code
My.Computer.Net work.UploadFile ("FileName", "ftp://name.MyServer.n et",
"UserName", "Password")
and
Dim c As New Net.NetworkCred ential
Dim snd As Net.FtpWebReque st
c.UserName = Me.txtUser.Text
c.Password = Me.mtxtPass.Tex t
For Each obj As Object In Me.lstAddedFile s.Items
Dim tmp As String = obj.ToString
Dim state As New FtpState
snd = WebRequest.Crea te(New Uri(Me.txtWebSi te.Text.Trim & "/" &
tmp.Substring(t mp.LastIndexOf( "\") + 1)))
snd.Credentials = c
snd.UseBinary = True
snd.Method = Net.WebRequestM ethods.Ftp.Uplo adFile
state.FileName = obj.ToString()
state.snd = snd
snd.BeginGetReq uestStream(Addr essOf FtpFileUploadCa llBack, state)
Next
any help would be great
--
-iwdu15
Comment