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.

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

martin

Re: WINSCP not moving files into FTP

harsha wrote:

WinScp is not moving files into ftp and I am getting below error.
MainModule 'winscp.MainModule' threw an exception of type 'System.ComponentModel.Win32Exception' System.Diagnostics.ProcessModule {System.ComponentModel.Win32Exception}

We do not know what your winscp.MainModule is. You should also start your own thread. I do not see any relation to this one.
harsha

WINSCP not moving files into FTP

Hi,

WinScp is not moving files into ftp and I am getting below error.
MainModule 'winscp.MainModule' threw an exception of type 'System.ComponentModel.Win32Exception' System.Diagnostics.ProcessModule {System.ComponentModel.Win32Exception}

Please help.
martin

Re: How do I get v 4.3.7 with the bug fix ?

It will be released in few days.
martin

Re: WinSCP returns exit code 1 when no apparent errors

stevyrino wrote:

Hello .... am using Server 2003 R2 with WinSCP 4.3.6 and .Net Automation in C#.
Am getting ExitCode = 1 on successful transer. No apparent errors in output or log.
These are attached.

I have sent you an email.
andys

I have the same issue

I have the same issue where my .NET code works fine and files are copied fine with no errors being logged but .NET is returning an exit code of 1

The stack trace is showing

MainModule = 'winscp.MainModule' threw an exception of type 'System.ComponentModel.Win32Exception'
base {System.Runtime.InteropServices.ExternalException} = {"Access is denied"}

I cannot see where the 'Access Denied' is being generated from as I am using accounts with full privileges on both source and destination systems

The winscp log shows a status code of 0

2012-02-08 10:45:59.414 Status code: 0
. 2012-02-08 10:45:59.414 Closing connection.
. 2012-02-08 10:45:59.414 Sending special code: 12
. 2012-02-08 10:45:59.414 Sent EOF message

Any help appreciated
stevyrino

WinSCP returns exit code 1 when no apparent errors

Hello .... am using Server 2003 R2 with WinSCP 4.3.6 and .Net Automation in C#.
Am getting ExitCode = 1 on successful transer. No apparent errors in output or log.
These are attached.

relevant .net code:

winscp = new System.Diagnostics.Process();
winscp.StartInfo.FileName = "winscp.com";
winscp.StartInfo.Arguments = "/log=\"" + logname + "\"";
winscp.StartInfo.UseShellExecute = false;
winscp.StartInfo.RedirectStandardInput = true;
winscp.StartInfo.RedirectStandardOutput = true;
winscp.StartInfo.CreateNoWindow = true;
winscp.Start();

winscp.StandardInput.WriteLine("option batch abort");
winscp.StandardInput.WriteLine("option confirm off");
winscp.StandardInput.WriteLine("open sftp://IBD:xxxxxx@ftp.bcliquor.com:22 -hostkey=\"ssh-dss 2048 82:a3:23:ef:81:7f:6e:f9:d9:95:10:f9:a7:d4:b1:ef\"");
winscp.StandardInput.WriteLine("cd Incoming");
winscp.StandardInput.WriteLine("put " + "\"" + batchFilePath + "\"");
winscp.StandardInput.Close();

// Collect all output
string output = winscp.StandardOutput.ReadToEnd();

// Wait until WinSCP finishes
winscp.WaitForExit();
int winscpExitCode = winscp.ExitCode;
winscp.Close();

Any help would be greatly appreciated.

regards
srdux@yahoo.com