Quantcast
Channel: sshnet Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 1026

Commented Issue: SFTP: Uploading Files to the FTP Server has Inconsistent Behavior [1550]

$
0
0
__Method Name:__ UploadFile()

__Issue:__ Files Uploaded to FTP Server has Inconsistent Behavior

I am trying to upload the file from local path to the ftp server, there is no exceptions in the uploadFile() method , but most of the times files were not uploaded and few times empty file was being uploaded.

Here is my code for uploading a file to the server:

using (var sftp = new SftpClient(sftpHost, user, password))
{
sftp.Connect();
string FilePath = "D:\\CurrentTask\\in\\new.txt";
string remoteFileName = "/folderName/filename.txt";

Stream fs = File.OpenRead(FilePath);
sftp.UploadFile(fs, remoteFileName);

sftp.Disconnect();
}

Could you help me to resolve this issue?

Thanks in Advance.
Comments: ** Comment from web user: drieseng **

Would it be possible to provide more details ?


Viewing all articles
Browse latest Browse all 1026

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>