currently I’m working on this ftp transfer. http://msdn.microsoft.com/en-us/library/ms229715.aspx
I have setup my server computers iis to have a ftp site on port 21 and transfering files works great. But I want to add ftp to a hosted site I got on the server and it’s here where I get the problems with connecting. when I try to connect through the command promt I get unknown host error. I have changed the port and open it up in firewall. and even if I could connect how can I decide what folder I want to upload to?
You still have connecting problem with the server.. try ping command and see if you get unknown host error.
For the upload path issue, you need to give the full folder path to which you need to upload the file to. here is an example code:
if (Site != null && FolderPath != null && FileName != null)
{
FTPrequest = (FtpWebRequest)FtpWebRequest.Create(new Uri(CompletePath));
}