Re: How to Open a Stored Session
Yes this works. I suggest you use my suggested approach anyway.
It is not supported.
You can configure any session settings, including proxy, using SessionOptions.AddRawSettings though:
https://winscp.net/eng/docs/library_sessionoptions_addrawsettings
That's good. Thank you!
SessionOptions sessionOptions = new SessionOptions
{
Protocol = Protocol.Ftp,
HostName = "TestFTPLocal",
};
using (Session session = new Session())
{
session.DefaultConfiguration = false;
session.IniFilePath =@"D:\yourdir\winscp.ini";
// Connect
session.Open(sessionOptions);
...
}
[Sessions\TestFTPLocal]
HostName=myserver
PortNumber=21
UserName=myuser
FSProtocol=5
Password=[encryptPwd]
It is not supported.
You can configure any session settings, including proxy, using SessionOptions.AddRawSettings though:
https://winscp.net/eng/docs/library_sessionoptions_addrawsettings