1

I'm trying to download a file using the Tamir SSH library. I'm able to connect to the remote FTP site, upload files to the site, but I'm getting exceptions when trying to download. I've given IIS_IUSRS full control of the local directory as well as ASPNET. I've tested an I'm able to create a text file in the same local directory I'm trying to download to. Any ideas?

string SFTP_HOST = ConfigurationManager.AppSettings["AccentivFtpHost"];
string SFTP_USERNAME =  ConfigurationManager.AppSettings["AccentivFtpUsername"];
string SFTP_PASSWORD = ConfigurationManager.AppSettings["AccentivFtpPassword"];

Sftp client = new Sftp(SFTP_HOST, SFTP_USERNAME, SFTP_PASSWORD);

client.Connect(22);
client.Get("test.txt", "c:\\test.txt");
1
  • 1
    What is the error/exception description?
    – EdSF
    Oct 10, 2012 at 0:24

1 Answer 1

0

You probably lack a '/' character in the file directory. You may need to put it either in the Get function call before the "test.txt" like "/test.txt" or at the end of your AccentivFtpHost value in the app config file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.