Quantcast
Channel: sshnet Discussions Rss Feed
Viewing all articles
Browse latest Browse all 1729

New Post: Cannot find message [/myfiletoupload.csv]

$
0
0
Hi,

I have a problem sending a file on a certain sftp server given by a customer.
The thing is, It's working great with my debug sftpserver I used to test with but when I want to test on the production sftpserver given by the customer, I get this error.

Maybe someone has an idea ? Specs about the prod sftp are not known :/

Here is my code:
            ObjPrivateKey = new ...
            ObjPrivateKeyAutentication = new ...

            ConnectionInfo objConnectionInfo = new ConnectionInfo(FtpHost, FtpPort, FtpUser, ObjPrivateKeyAutentication);
            var sftp = new SftpClient(objConnectionInfo);
            sftp.Connect();
            sftp.ChangeDirectory(FtpFolder);
            sftp.WriteAllBytes(filePath, data);
            sftp.Disconnect();
I get the error on WrilteAllBytes method from sftpClient

Here is the Exception Message: Cannot find message [/myfiletoupload.csv]

The Stack Trace:
  at Renci.SshNet.Sftp.SftpSession.RequestFStat(Byte[] handle, Boolean nullOnError)
   at Renci.SshNet.Sftp.SftpFileStream..ctor(SftpSession session, String path, FileMode mode, FileAccess access, Int32 bufferSize, Boolean useAsync)
   at Renci.SshNet.Sftp.SftpFileStream..ctor(SftpSession session, String path, FileMode mode, FileAccess access)
   at Renci.SshNet.SftpClient.OpenWrite(String path)
   at Renci.SshNet.SftpClient.WriteAllBytes(String path, Byte[] bytes)
Thank you in advance !

Viewing all articles
Browse latest Browse all 1729

Trending Articles



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