public void UploadAsync(string path, string ftpPath, bool overwrite) { using (WebClient webClient = webClientHelper.Create()) { webClient.UploadProgressChanged += new UploadProgressChangedEventHandler(UploadProgressChanged); webClient.UploadFileCompleted += new UploadFileCompletedEventHandler(UploadFileCompleted); webClient.UploadFileAsync(new Uri(ftpPath), path); } }