I once made a WinForms FTP uploader, and it worked very good.
now, I’m trying to make the same program, just with a new look and in WPF a very organized one too.
I tried using a WebClient and UploadFileAsync [so it won’t block the calling thread], as I did with the WinForms, but in the WPF, instead of uploading the file, absolutely nothing happened. the program just kept running as if nothing happened.
so I tried to use the method UploadFile [that does block the calling thread] and than the window just freezed forever. so now I tried to use FTPWebRequest and the same, the program just freezes.
Is there a special way for WPF to upload files? or can it even upload at all?
because I’m sure my code is fine.
Thanks.
Edit:
this is the code for the UploadFileAsync:
WebClient client = new WebClient();
client.Credentials = new System.Net.NetworkCredential("user", "password");
client.UploadFileAsync(new Uri("ftp://server.com/"), "STOR", "C:\\file.txt");
pls post the example of how you are doing this. WPF is the new GUI framework based on XAML, and everything is based on .NET framework, so all the functionality (that is in your Model) should work as it is.
it could be that you are having proble with actually firing these commands which does the uploading bit.