Topic "Invalid Access to memory. Can't connect to the server"

Author Message
Guest




Hi, I'm using WinSCP 4.3.0.1029 in multi-threading application to send files into SFTP server. In application I used your example of C# code:
Code:
               
Process winscp = new Process();
winscp.StartInfo.FileName = ConfigurationManager.AppSettings["WinScp"]+"winscp.com";
winscp.StartInfo.UseShellExecute = false;
winscp.StartInfo.RedirectStandardInput = true;
winscp.StartInfo.RedirectStandardOutput = true;
winscp.StartInfo.CreateNoWindow = true;
winscp.Start();

                /// Feed in the scripting commands
winscp.StandardInput.WriteLine("option batch on");
winscp.StandardInput.WriteLine("option confirm off");
winscp.StandardInput.WriteLine("open " + ConfigurationManager.AppSettings["protocol"]
   + "://" + ConfigurationManager.AppSettings["User"] + ":"
   + ConfigurationManager.AppSettings["Pass"] + "@"
   + ConfigurationManager.AppSettings["Host"] + ":"
   + ((ConfigurationManager.AppSettings["Port"] != null) ? ConfigurationManager.AppSettings["Port"] : "22")
   + " -hostkey=\"" + ConfigurationManager.AppSettings["hostkey"] + "\"");
winscp.StandardInput.WriteLine("ls");
winscp.StandardInput.WriteLine("put " + tmp_name + " " + String.Concat(arc_folder, Path.GetFileName(inputFile)));
winscp.StandardInput.WriteLine("exit");
winscp.StandardInput.Close();

string output = winscp.StandardOutput.ReadToEnd();

winscp.WaitForExit();


Three days it works fine, except that sometimes appears this error
Code:

winscp> option batch on
batch           on       
winscp> option confirm off
confirm         off       
winscp> open SFTP://XXXX:xxxxx@XX.XX.XX.XX:2222 -hostkey="ssh-dss 1024 XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX"
Searching for host...
Connecting to host...
Authenticating...
Using username "XXXXXX".
Authenticating with pre-entered password.
Authenticated.
Starting the session...
Reading remote directory...
Session started.
Active session: [1] XXXXXX@XX.XX.XX.XX
winscp> ls
D---------   0                           0 Dec  2 12:41:21 2010 kozlplc1
D---------   0                           0 Dec  2 17:01:19 2010 PLC01
D---------   0                           0 Nov 29 13:28:54 2010 PLC02
D---------   0                           0 Dec  2 15:07:04 2010 sl01
D---------   0                           0 Dec  2 15:06:52 2010 sl02
D---------   0                           0 Dec  2 15:12:42 2010 sl03
D---------   0                           0 Dec  2 15:21:04 2010 sl04
winscp> put C:\WINDOWS\TEMP\tmp73F.tmp /sl01/min_cur.js
C:\WINDOWS\TEMP\tmp73F.tmp |          2 KiB |    0,0 KiB/s | binary | 100%
Upload of file 'min_cur.js' was successful, but error occurred while setting the permissions and/or timestamp. If the problem persists, turn on 'Ignore permission errors' option.
No such file or directory.
Error code: 2
Error message from server (en): The file does not exist.
Request code: 9
(A)bort, (R)etry, (S)kip, Ski(p) all: Abort
winscp> exit

But it may appears because of another service on server, which catch incoming files, so this error is not critical and Ok.

But today morning WinSCP was totally crashed and generate this error
Code:

winscp> option batch on
batch           on       
winscp> option confirm off
confirm         off       
winscp> open SFTP://XXXX:xxxxx@XX.XX.XX.XX:2222 -hostkey="ssh-dss 1024 XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX"
Searching for host...
Connecting to host...
Host is not communicating for more than 15 seconds. Still waiting...
Warning: Aborting this operation will close connection!
(A)bort: Abort
Terminated by user.
winscp> ls
No session.
winscp> put C:\WINDOWS\TEMP\tmpF.tmp /sl01/min_day.js
No session.
winscp> exit

All attempts has the same result. Communication is Ok, SFTP server is works and accessible, no changes in port forwarding or something similar was made. PC restart does not help.
When I tried to use WinSCP.exe after input login data and press login I got "Invalid Access to memory", may be caused by Windows version limitation and it's not critical.

Windows XP Embedded SP 3

Another PC with the same configuration works fine (except point "Invalid Access to memory").
Guest




Already resolved. Customer forgot to pay for internet connection...
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License