Posted: 2012-04-30 15:55
I'm trying to synch a folder using the winscp automation stuff but I need to bypass the network proxy. Here is my current code:
Process winscp = new Process();
winscp.StartInfo.FileName = winScpLocation;
winscp.StartInfo.RedirectStandardInput = true;
winscp.StartInfo.UseShellExecute = false;
winscp.StartInfo.CreateNoWindow = true;
winscp.StandardInput.WriteLine("option batch abort");
winscp.StandardInput.WriteLine("option confirm off");
winscp.StandardInput.WriteLine("open ftp://" + ftpUserName + ":" + ftpPassword + "@" + ftpSite + " -passive=off");
winscp.StandardInput.WriteLine("put " + appOfflinePath);
This works fine when transferring to an internal FTP server but not when going external to the network. In FileZilla I would just select the 'bypass proxy' checkbox and all is well but the code above just hangs indefinately.
Any help would be amazing!
Location: Prague, Czechia
Afaik, Bypass proxy in Filezilla just disables using globally set proxy for that particular session. WinSCP does not have global proxy settings. It has per-session proxy settings only. So you just do not set proxy instead. So you code should work as is.
Anyway, I recommend you use WinSCP .NET assembly instead.
Posted: 2012-05-02 13:27
Hmm weird. I'll have a go with the .net assembly instead, it seems there is definitely some connection setting issue though as it works fine to internal FTP but not externally
You can post new topics in this forum
And it's free!