Hi,
Please help me with my vb dotnet code. I'm trying to upload a file to
an ftp website. The program seems hung on this line of code
"wrqToVendor.GetResponse". I'm not getting anything back.
I tried the webclient upload but it does not work for .NET framework
1.1. If you have any other suggestions, please let me know.
Appreciated your help in advance.
Teresa
Dim wrqToVendor As WebRequest
Dim wrsFromVendor As WebResponse
Dim thisStream As System.IO.Stream
Dim srReadLine As System.IO.StreamReader
wrqToVendor = WebRequest.Create("http://ftp.mywebsite.com" + "?" +
"c:\temp\test.txt")
wrqToVendor.Method = "PUT"
Dim myCred As New Net.NetworkCredential("myid", "mypassw")
wrqToVendor.Credentials = myCred
wrsFromVendor = wrqToVendor.GetResponse()
thisStream = wrsFromVendor.GetResponseStream
srReadLine = New System.IO.StreamReader(thisStream,
System.Text.Encoding.ASCII)
While (srReadLine.Peek() > -1)
value += srReadLine.ReadLine()
valueLineCount += 1
End While
wrsFromVendor.Close()
thisStream.Close()
srReadLine.Close()