Transfer Files via FTP
I want to transfer a file through FTP to another computer,I have no idea of it,of course I have tested the methods of Uri and UriBuiding ad uploading to the destination,but it did not solved my problem.DOes anybody why my proccess does not wok in a project of ASP.NET with the codebehind:
String FileName="E:\\Documents and Settings\\snutmp43\\Desktop\\MyXml.xml";
UriBuilder URI=new UriBuilder();
URI.Scheme="ftp";
URI.Host="localhost";
URI.Port=21;
URI.Path="Virtual/Xml.xml";
Uri MuUri=URI.Uri;
Response.Write(MuUri.ToString());
WebClient client=new WebClient();
client.UploadFile(MuUri.ToString(),FileName);
I need some guidance,or even better a simple sample,of tranfering files via FTP through an ASP.NET web application by the code behind C#.Please help me as soon as U can:(
|