Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to use VB.Net WebClient.UploadFile

Status
Not open for further replies.

EnS

Programmer
Oct 29, 2002
58
US
Hello,

I'm new to the .Net arena and have a question on how to upload a file from my local drive to an FTP server using the WebClient.UploadFile. I have been able to establish a connection to the FTP server but keep getting a 550 File Unavailable error. I'm about to jump of the nearest bridge if I can get this to work.

This is the syntax I am using:

Dim FtpClient as New System.Net.WebClient

FtpClient.UploadFile("ftp://user:password@ipaddress:21/path",WebRequestMethods.Ftp.UploadFile, "C:\temp\textfile.txt")

Can someone please help me figure out what I'm doing wrong and maybe point me in the right direction to isolate exactly why the request can't process the file?

Your help is greatly appreciated.



ERM
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top