We followed the below link while winscp.net implementation by using version 5.7.6(Build 5874).
https://winscp.net/eng/docs/library#csharp
As part of file upload, SessionLogPath is mandatory before open session.
So we start with the following code after Setuping the session options
session.SessionLogPath = @"D:\winScpLog\";
session.Open(sessionOptions);
While executing we got the following error.
Error parsing session log file:
{WinSCP.SessionLocalException: Error parsing session log file ---> System.Xml.XmlException: '', hexadecimal value 0x07, is an invalid character. Line 2, position 62.
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args)
at System.Xml.XmlTextReaderImpl.ThrowInvalidChar(Char[] data, Int32 length, Int32 invCharPos)
at System.Xml.XmlTextReaderImpl.ParseAttributeValueSlow(Int32 curPos, Char quoteChar, NodeData attr)
at System.Xml.XmlTextReaderImpl.ParseAttributes()
at System.Xml.XmlTextReaderImpl.ParseElement()
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
at System.Xml.XmlTextReaderImpl.Read()
at WinSCP.SessionLogReader.DoRead()
--- End of inner exception stack trace ---
at WinSCP.SessionLogReader.DoRead()
at WinSCP.SessionLogReader.Read(LogReadFlags flags)
at WinSCP.CustomLogReader.TryWaitForNonEmptyElement(String localName, LogReadFlags flags)
at WinSCP.CustomLogReader.WaitForNonEmptyElement(String localName, LogReadFlags flags)
at WinSCP.Session.Open(SessionOptions sessionOptions)
at WinSCPFileUpload.Form1.BtnUpload_Click(Object sender, EventArgs e)
Please guide us to solve the issue related to file upload task.