need help with uploading a file

shadow314

New member
Joined
May 12, 2010
Messages
1
Programming Experience
Beginner
Hello all,

I'm trying to upload a file to a ftp location. Below is the code I'm working with and it throws me an exception, as passive mode. Please take a look and provide me some inputs as how to make it more robust. Also I'm new to vb.net environment and this is my first post on this forum.

Dim strUpLoadFile As String
Dim siteUri As New Uri("ftp://10.0.0.221/sample.txt")
strUpLoadFile = "C:\sample.txt"
My.Computer.Network.UploadFile(strUpLoadFile, siteUri)


"The remote server returned an error: 227 Entering Passive Mode (10,0,0,221,8,158)."



thanks.
 
That's actually not a error message. It simply says that the client sent a PASV command to the server and that is perfectly valid. I don't see in your code any authentication attempt.
 
Back
Top