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.

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)


Topic review


Re: Connection failed on session.Open method

So did you try "anonymous" for username?

Connection failed on session.Open method

Connection failed at WinSCP.SessionLogReader.Read(LogReadFlags flags)
at WinSCP.ElementLogReader.Read(LogReadFlags flags)
at WinSCP.SessionElementLogReader.Read(LogReadFlags flags)
at WinSCP.CustomLogReader.TryWaitForNonEmptyElement(String localName, LogReadFlags flags)
at WinSCP.CustomLogReader.WaitForNonEmptyElement(String localName, LogReadFlags flags)
at WinSCP.Session.WaitForGroup()
at WinSCP.Session.Open(SessionOptions sessionOptions)
at WebApplication1.WinSCP.btnCheck_Click(Object sender, EventArgs e)

I am using anonymous access to my ftp. and i created ftp locally. So what password and username i give ? Whatever i give its failing
// Setup session options
SessionOptions sessionOptions = new SessionOptions
Protocol = Protocol.Ftp,
HostName = "ftp://sringeri/",
UserName = "", // what should i give?
Password = "" //what should i give ?

const string remotePath = "ftp://sringeri/";

using (Session session = new Session())
// Connect
session.Open(sessionOptions); // here it exists