Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: Error parsing session log file and "'\b', hexadecimal value

Please set Session.DebugLogPath and attach (or email me) the log.
Guest

Hi Everyone,

I got solution for above mentioned problem it might help others

Username="abcd/host" ---------- its not allowing "/h"
and giving the below error
"'\h', hexadecimal value 0x08, is an invalid character. Line 2, position 65."

Now i Resolved it like below
Username=@"abcd/host"------here i added @

Thanks,
Dinesh.
Guest

Error parsing session log file and "'\b', hexadecimal value

Hi Everyone,

I need help from you guys, I thanks in advance. Actually the problem is Iam running Windows Application using C#4.0 Visual Studio 2010 on Windows7 O.S.
In this Application i have a Function Uploadto FTP()below is my function
public int UploadFiletoFTP()
{
SessionOptions sessionOptions = new SessionOptions
{
Protocol = Protocol.Sftp,
HostName = "XXXXXXXXXX",
UserName = "XXXXXXXXX",
Password = "XXXXXXXXX",
SshHostKeyFingerprint = "ssh-rsa XXXXXXXXXXX"

};

using (Session session = new Session())
{
// Connect
Common.Errlog("Connecting to the FTP.....");
session.Open(sessionOptions);
Common.Errlog("Connection to the FTP successfull....");
// Upload files
TransferOptions transferOptions = new TransferOptions();
transferOptions.TransferMode = TransferMode.Binary;

TransferOperationResult transferResult;
Common.Errlog("Fetching File from file system......");
transferResult = session.PutFiles(@filepathofCSVFile + TodaysDate + ".csv", "/home/tradein/", false, transferOptions);

// Throw on any error
transferResult.Check();

// Print results
foreach (TransferEventArgs transfer in transferResult.Transfers)
{
Console.WriteLine("Upload of {0} succeeded", transfer.FileName);

}
}
}
}

Iam getting Error at session.Open(sessionOptions); In this function iam trying to upload a function a CSV file to SFTP Server.

Note: That Server is SFTP.


Thanks,
Dinesh.