Already resolved. Customer forgot to pay for internet connection...
- Guest
Before posting, please read how to report bug or request support effectively.
Bug reports without an attached log file are usually useless.
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();
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
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