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:
Here is the Exception Message: Cannot find message [/myfiletoupload.csv]
The Stack Trace:
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 sftpClientHere 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 !