Post a reply

Options
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)

Options

Topic review

csurfleet

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 :?
martin

Re: Bypassing proxy

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.
https://winscp.net/eng/docs/library
csurfleet

Bypassing proxy

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.Start();

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);
winscp.StandardInput.WriteLine("exit");

winscp.StandardInput.Close();

winscp.WaitForExit();


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!