Hi,
I am currently in the process of evaluating the Sftp client library for .NET and am trying to run the SftpFileList_VB console application that was downloaded with the samples.
I am having trouble with the GetList and ChangeDirectory methods on the Sftp object. I have a folder called c:scratch. I am trying to use that folder as the remote path in the program (see FileList.vb).
I get the following errors when running the program with different values for the remote path:
1) setting remotePath = "/C/scratch":
'this line throws exception:
Dim list As SftpItemCollection = ftp.GetList()
Rebex.Net.SftpException was unhandled
HResult=-2146233088
Message=Permission denied; Permission denied.
ProtocolCode=3
ProtocolMessage=Permission denied.
Source=Rebex.Sftp
Transferred=0
2) setting remotePath = "C/scratch" or "/scratch":
'this line throws exception:
ftp.ChangeDirectory(remotePath)
Rebex.Net.SftpException was unhandled
HResult=-2146233088
Message=Error 10; The file path does not exist or is invalid.
ProtocolCode=10
ProtocolMessage=The file path does not exist or is invalid.
Source=Rebex.Sftp
Transferred=0
3) setting remotePath = "scratch":
'this line throws exception:
ftp.ChangeDirectory(remotePath)
Rebex.Net.SftpException was unhandled
HResult=-2146233088
Message=No such file; The file does not exist.
ProtocolCode=2
ProtocolMessage=The file does not exist.
Source=Rebex.Sftp
Transferred=0
Similarly the SftpGetPut_VB console application is throwing exceptions which I believe are related to the remote path.
If someone could put us on the right track it would be much appreciated.
Ron