Connection failed when trying to open a session
Hello,
When I try to open a session, I get one of these exceptions (depending on the
– WinSCP.exe also connected successfully.
Any suggestion what could be the problem?
Thank you
My code:
When I try to open a session, I get one of these exceptions (depending on the
SessionOptions
):
orCould not read status line: An existing connection was forcibly closed by the remote host.
– I tried running a batch file with anCould not read status line: connection was closed by server
open
command – runs successfully.
– WinSCP.exe also connected successfully.
Any suggestion what could be the problem?
Thank you
My code:
var sessionOptions = new SessionOptions { Protocol = Protocol.Webdav, HostName = "***.net", UserName = "***", Password = "***", PortNumber = 443, WebdavSecure = false, }; using (var session = new Session()) { session.Open(sessionOptions); ... }