G
Guest
Can you find anything wrong with the code below? It blows up in io =
request.GetRequestStream.
It worked fine with one FTP server and not with another.
Dim request As FtpWebRequest
Dim password As String
Dim response As FtpWebResponse
password = ConfigurationManager.AppSettings("ftppwd")
request = WebRequest.Create(FTPlocation.Text)
request.Method = WebRequestMethods.Ftp.UploadFile
request.Credentials = New NetworkCredential(FTPAccount.Text,
password)
Dim io As Stream
buff = out.ToString
Dim b As Byte()
b = Encoding.ASCII.GetBytes(buff)
request.ContentLength = b.Length
io = request.GetRequestStream
io.Write(b, 0, b.Length)
io.Close()
request.GetRequestStream.
It worked fine with one FTP server and not with another.
Dim request As FtpWebRequest
Dim password As String
Dim response As FtpWebResponse
password = ConfigurationManager.AppSettings("ftppwd")
request = WebRequest.Create(FTPlocation.Text)
request.Method = WebRequestMethods.Ftp.UploadFile
request.Credentials = New NetworkCredential(FTPAccount.Text,
password)
Dim io As Stream
buff = out.ToString
Dim b As Byte()
b = Encoding.ASCII.GetBytes(buff)
request.ContentLength = b.Length
io = request.GetRequestStream
io.Write(b, 0, b.Length)
io.Close()