FTP
-
Hi, Im using c# to develop a web application and basically I need to ftp files over to a server. Is there any functionality in c# to do this or will I have to use an external library and if so any recommendations? Thank in advance Stephen
-
Hi, Im using c# to develop a web application and basically I need to ftp files over to a server. Is there any functionality in c# to do this or will I have to use an external library and if so any recommendations? Thank in advance Stephen
Try looking at WebRequestMethods.Ftp[^] in the System.Net namespace of the 2.0 framework.
-
Hi, Im using c# to develop a web application and basically I need to ftp files over to a server. Is there any functionality in c# to do this or will I have to use an external library and if so any recommendations? Thank in advance Stephen
...and the FtpWebRequest[^] class. Here's a link to a cp article showing an example of use: http://www.codeproject.com/vb/net/FtpClient.asp[^]
-
Hi, Im using c# to develop a web application and basically I need to ftp files over to a server. Is there any functionality in c# to do this or will I have to use an external library and if so any recommendations? Thank in advance Stephen
This is yet another library, in case you are using .net 1.1 I think it's stable and work ok for me. C# FTP Client Library[^] daniero
-
Hi, Im using c# to develop a web application and basically I need to ftp files over to a server. Is there any functionality in c# to do this or will I have to use an external library and if so any recommendations? Thank in advance Stephen
Microsofts support for FTP is just pathetic. You can use this library (its free) http://www.smartftp.com/ftplib/[^] (From the makers of Smart FTP) I have tried it out and found it works very well... Matthew Hazlett EDIT: Oops Sorry, it used to be free... -- modified at 19:34 Tuesday 24th January, 2006
-
...and the FtpWebRequest[^] class. Here's a link to a cp article showing an example of use: http://www.codeproject.com/vb/net/FtpClient.asp[^]
Hi Thanks for your response, I tried using this but Im getting problems. I can connect to the ftp server and list directory ok, but when I try to upload a file I get "550 : Access is denied". The credentials I am using are the exact same as what I use when using all other ftp clients. Is there something I am missing? This is the code: FtpWebRequest ftpRequest = (FtpWebRequest)FtpWebRequest.Create(ftpLocation); ftpRequest.Method = WebRequestMethods.Ftp.UploadFile; ftpRequest.Credentials = new NetworkCredential(FTPUsername, FTPPassword); ftpRequest.UseBinary = true; StreamReader sourceStream = new StreamReader(pathOfFileToBeFTPd); byte[] fileContents = Encoding.UTF8.GetBytes(sourceStream.ReadToEnd()); sourceStream.Close(); ftpRequest.ContentLength = fileContents.Length; Stream requestStream = ftpRequest.GetRequestStream(); <-----Throws WebException
-
Hi, Im using c# to develop a web application and basically I need to ftp files over to a server. Is there any functionality in c# to do this or will I have to use an external library and if so any recommendations? Thank in advance Stephen
-
Have your tried doing the FTp function through IE first. This will verify whther the user, password, and location are correct. 1 line of code equals many bugs. So don't write any!!
how do you do a put through IE?
-
how do you do a put through IE?
ftp://ftp.microsoft.com/[^] Click Help-Index then type FTP ftp://ftp.microsoft.com:userName@password I believe. I usually user WS_FTP http://www.ipswitch.com/[^] 1 line of code equals many bugs. So don't write any!! -- modified at 9:14 Wednesday 25th January, 2006