Topic "Session Class"

Author Message
kmdshuaib
[View user's profile]

Joined: 2012-10-16
Posts: 1
Location: Singapore
Hi,
Whenever i create a new session object for session class, it take approximately around 2 mins, is this normal behavior with the code or any problem in the code.
For your reference i am listing my code, and the highlighted line is the cause.

Code:
SessionOptions sessionOptions = new SessionOptions
                {
                    Protocol =  Protocol.Ftp,
                    HostName = strSFtpSite,
                    UserName = strSFtpUserName,
                    Password = strSFtpPassword,
                    PortNumber = 21,
                    FtpMode = FtpMode.Passive,
                    FtpSecure = FtpSecure.None
                };

              [color=red][b] using (var session = new Session())[/b][/color]   [color=green][i]//this is the line which is taking time [/i][/color]
                {
                    session.SessionLogPath = "SessionWinSCP.txt";
                    session.Open(sessionOptions);
                   
                    if (!Directory.Exists(strDestination))
                    {
                        Logger.Info("Creating destination directory " + strDestination + ".");
                        Directory.CreateDirectory(strDestination);
                    }
                    session.GetFiles( strSourceFileName, strDestination).Check();
                       
                    session.Dispose();
                 
                }


Please help me on this.

Thanks.
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24538
Location: Prague, Czechia
Please set Session.DebugLogPath and Session.SessionLogPath and post both logs or email them to me.
_________________
Martin Prikryl
uzzieljv
[View user's profile]

Joined: 2013-04-11
Posts: 7
Hello
To me it is the same.
Can you help me?

These are the files.
uzzieljv
[View user's profile]

Joined: 2013-04-11
Posts: 7
[2013-04-10 19:42:27.272Z] [0001] Executing Assembly: WinSCP, Version=1.0.5.2937, Culture=neutral, PublicKeyToken=b5f19f5762436b89; Path: C:\Users\ujimenez\Documents\Pruebas\SFTP Client WinSCP .NET Assembly\SFTP Client WinSCP .NET Assembly\bin\Debug\WinSCP.DLL; Location: C:\Users\ujimenez\Documents\Pruebas\SFTP Client WinSCP .NET Assembly\SFTP Client WinSCP .NET Assembly\bin\Debug\WinSCP.dll; Product: 5.1.4.0
[2013-04-10 19:42:27.272Z] [0001] Entry Assembly: SFTP_Client_WinSCP.NET_Assembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
[2013-04-10 19:42:27.272Z] [0001] Operating system: Microsoft Windows NT 6.1.7600.0
[2013-04-10 19:42:27.288Z] [0001] User: ujimenez@PTCORP@PC-UJ; Interactive: True
[2013-04-10 19:42:27.288Z] [0001] Runtime: 4.0.30319.296
[2013-04-10 19:42:27.444Z] [0001] Console encoding: Input: Europa occidental (DOS) (850); Output: Europa occidental (DOS) (850)
[2013-04-10 19:42:27.444Z] [0001] Working directory: C:\Users\ujimenez\Documents\Pruebas\SFTP Client WinSCP .NET Assembly\SFTP Client WinSCP .NET Assembly\bin\Debug
[2013-04-10 19:42:27.522Z] [0001] CallstackAndLock..ctor entering
[2013-04-10 19:42:27.522Z] [0001] Session.SetupTempPath entering
[2013-04-10 19:42:27.522Z] [0001] Temporary folder: C:\Users\ujimenez\AppData\Local\Temp\
[2013-04-10 19:42:27.522Z] [0001] Temporary file [C:\Users\ujimenez\AppData\Local\Temp\wscp03A8.0141B42A.tmp] - Exists [False]
[2013-04-10 19:42:27.522Z] [0001] Session.SetupTempPath leaving
[2013-04-10 19:42:27.522Z] [0001] ExeSessionProcess..ctor entering
[2013-04-10 19:42:27.522Z] [0001] ExeSessionProcess.GetExecutablePath entering
[2013-04-10 19:42:27.538Z] [0001] Executable not found in C:\Users\ujimenez\Documents\Pruebas\SFTP Client WinSCP .NET Assembly\SFTP Client WinSCP .NET Assembly\bin\Debug\winscp.exe
[2013-04-10 19:42:27.538Z] [0001] ExeSessionProcess.GetExecutablePath leaving
[2013-04-10 19:42:27.538Z] [0001] EXE executable path resolved to C:\Users\ujimenez\Documents\Pruebas\SFTP Client WinSCP .NET Assembly\SFTP Client WinSCP .NET Assembly\bin\Debug\winscp.exe
[2013-04-10 19:42:27.538Z] [0001] ExeSessionProcess.CheckVersion entering
[2013-04-10 19:42:27.538Z] [0001] Version of C:\Users\ujimenez\Documents\Pruebas\SFTP Client WinSCP .NET Assembly\SFTP Client WinSCP .NET Assembly\bin\Debug\winscp.exe is 5.1.4.3020, product WinSCP version is 5.1.4.0
[2013-04-10 19:42:27.538Z] [0001] ExeSessionProcess.CheckVersion leaving
[2013-04-10 19:42:27.538Z] [0001] ExeSessionProcess..ctor leaving
[2013-04-10 19:42:27.538Z] [0001] ExeSessionProcess.Start entering
[2013-04-10 19:42:27.553Z] [0001] ExeSessionProcess.InitializeConsole entering
[2013-04-10 19:42:27.553Z] [0001] ExeSessionProcess.InitializeConsole leaving
[2013-04-10 19:42:27.553Z] [0001] ExeSessionProcess.InitializeChild entering
[2013-04-10 19:42:27.553Z] [0001] Starting "C:\Users\ujimenez\Documents\Pruebas\SFTP Client WinSCP .NET Assembly\SFTP Client WinSCP .NET Assembly\bin\Debug\winscp.exe" /xmllog="C:\Users\ujimenez\AppData\Local\Temp\wscp03A8.0141B42A.tmp" /xmlgroups /nointeractiveinput /dotnet=514 /ini=nul /log="SessionLogPath" /console /consoleinstance=_936_174
[2013-04-10 19:42:27.569Z] [0001] Started process 7508
[2013-04-10 19:42:27.569Z] [0001] ExeSessionProcess.InitializeChild leaving
[2013-04-10 19:42:27.569Z] [0001] ExeSessionProcess.Start leaving
[2013-04-10 19:42:27.569Z] [0001] Command: [option batch on]
[2013-04-10 19:42:27.569Z] [0003] ExeSessionProcess.ProcessEvents entering
[2013-04-10 19:42:27.569Z] [0001] ExeSessionProcess.ExecuteCommand entering
[2013-04-10 19:42:27.569Z] [0001] ExeSessionProcess.ExecuteCommand leaving
[2013-04-10 19:42:27.569Z] [0001] Command: [option confirm off]
[2013-04-10 19:42:27.569Z] [0001] ExeSessionProcess.ExecuteCommand entering
[2013-04-10 19:42:27.569Z] [0001] ExeSessionProcess.ExecuteCommand leaving
[2013-04-10 19:42:27.569Z] [0001] Session.SessionOptionsToOpenArguments entering
[2013-04-10 19:42:27.569Z] [0001] Session.SessionOptionsToOpenSwitches entering
[2013-04-10 19:42:27.569Z] [0001] Session.SessionOptionsToOpenSwitches leaving
[2013-04-10 19:42:27.569Z] [0001] Session.SessionOptionsToOpenArguments leaving
[2013-04-10 19:42:27.569Z] [0001] Command: [open -hostkey="ssh-dss 1024 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx" -timeout=15 "sftp://myuser:****@ftp.myftp.com"]
[2013-04-10 19:42:27.569Z] [0001] ExeSessionProcess.ExecuteCommand entering
[2013-04-10 19:42:27.569Z] [0001] ExeSessionProcess.ExecuteCommand leaving
[2013-04-10 19:42:27.912Z] [0003] ExeSessionProcess.ProcessEvent entering
[2013-04-10 19:42:27.912Z] [0003] ExeSessionProcess.ProcessInitEvent entering
[2013-04-10 19:42:27.912Z] [0003] ExeSessionProcess.ProcessInitEvent leaving
[2013-04-10 19:42:27.912Z] [0003] ExeSessionProcess.ProcessEvent leaving
[2013-04-10 19:42:27.912Z] [0003] ExeSessionProcess.ProcessEvent entering
[2013-04-10 19:42:27.912Z] [0003] ExeSessionProcess.ProcessTitleEvent entering
[2013-04-10 19:42:27.912Z] [0003] Not-supported title event [WinSCP]
[2013-04-10 19:42:27.912Z] [0003] ExeSessionProcess.ProcessTitleEvent leaving
[2013-04-10 19:42:27.912Z] [0003] ExeSessionProcess.ProcessEvent leaving
[2013-04-10 19:42:27.912Z] [0003] ExeSessionProcess.ProcessEvent entering
[2013-04-10 19:42:27.912Z] [0003] ExeSessionProcess.ProcessTitleEvent entering
[2013-04-10 19:42:27.912Z] [0003] Not-supported title event [WinSCP]
[2013-04-10 19:42:27.912Z] [0003] ExeSessionProcess.ProcessTitleEvent leaving
[2013-04-10 19:42:27.912Z] [0003] ExeSessionProcess.ProcessEvent leaving
[2013-04-10 19:42:27.912Z] [0003] ExeSessionProcess.ProcessEvent entering
[2013-04-10 19:42:27.912Z] [0003] ExeSessionProcess.ProcessEvent leaving
[2013-04-10 19:42:27.912Z] [0003] ExeSessionProcess.ProcessEvent entering
[2013-04-10 19:42:27.912Z] [0003] ExeSessionProcess.ProcessInputEvent entering
[2013-04-10 19:42:27.912Z] [0003] Scheduling output: [winscp> option batch on]
[2013-04-10 19:42:27.912Z] [0003] ExeSessionProcess.ProcessInputEvent leaving
[2013-04-10 19:42:27.912Z] [0003] ExeSessionProcess.ProcessEvent leaving
[2013-04-10 19:42:27.912Z] [0003] ExeSessionProcess.ProcessEvent entering
[2013-04-10 19:42:27.912Z] [0003] Scheduling output: [batch on ]
[2013-04-10 19:42:27.912Z] [0003] ExeSessionProcess.ProcessEvent leaving
[2013-04-10 19:42:27.912Z] [0003] ExeSessionProcess.ProcessEvent entering
[2013-04-10 19:42:27.912Z] [0003] ExeSessionProcess.ProcessTitleEvent entering
[2013-04-10 19:42:27.912Z] [0003] Not-supported title event [WinSCP]
[2013-04-10 19:42:27.912Z] [0003] ExeSessionProcess.ProcessTitleEvent leaving
[2013-04-10 19:42:27.912Z] [0003] ExeSessionProcess.ProcessEvent leaving
[2013-04-10 19:42:27.912Z] [0003] ExeSessionProcess.ProcessEvent entering
[2013-04-10 19:42:27.912Z] [0003] ExeSessionProcess.ProcessEvent leaving
[2013-04-10 19:42:27.912Z] [0003] ExeSessionProcess.ProcessEvent entering
[2013-04-10 19:42:27.912Z] [0003] ExeSessionProcess.ProcessInputEvent entering
[2013-04-10 19:42:27.912Z] [0003] Scheduling output: [winscp> option confirm off]
[2013-04-10 19:42:27.912Z] [0003] ExeSessionProcess.ProcessInputEvent leaving
[2013-04-10 19:42:27.912Z] [0003] ExeSessionProcess.ProcessEvent leaving
[2013-04-10 19:42:27.912Z] [0003] ExeSessionProcess.ProcessEvent entering
[2013-04-10 19:42:27.912Z] [0003] Scheduling output: [confirm off ]
[2013-04-10 19:42:27.912Z] [0003] ExeSessionProcess.ProcessEvent leaving
[2013-04-10 19:42:27.912Z] [0003] ExeSessionProcess.ProcessEvent entering
[2013-04-10 19:42:27.912Z] [0003] ExeSessionProcess.ProcessTitleEvent entering
[2013-04-10 19:42:27.912Z] [0003] Not-supported title event [WinSCP]
[2013-04-10 19:42:27.912Z] [0003] ExeSessionProcess.ProcessTitleEvent leaving
[2013-04-10 19:42:27.912Z] [0003] ExeSessionProcess.ProcessEvent leaving
[2013-04-10 19:42:27.912Z] [0003] ExeSessionProcess.ProcessEvent entering
[2013-04-10 19:42:27.912Z] [0003] ExeSessionProcess.ProcessEvent leaving
[2013-04-10 19:42:27.912Z] [0003] ExeSessionProcess.ProcessEvent entering
[2013-04-10 19:42:27.912Z] [0003] ExeSessionProcess.ProcessInputEvent entering
[2013-04-10 19:42:27.912Z] [0003] Scheduling output: [winscp> open -hostkey="ssh-dss 1024 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx" -timeout=15 "sftp://myuser:******@ftp.myftp.com"]
[2013-04-10 19:42:27.912Z] [0003] ExeSessionProcess.ProcessInputEvent leaving
[2013-04-10 19:42:27.912Z] [0003] ExeSessionProcess.ProcessEvent leaving
[2013-04-10 19:42:27.927Z] [0003] ExeSessionProcess.ProcessEvent entering
[2013-04-10 19:42:27.927Z] [0003] Scheduling output: [Searching for host...]
[2013-04-10 19:42:27.927Z] [0003] ExeSessionProcess.ProcessEvent leaving
[2013-04-10 19:42:27.943Z] [0001] SessionLogReader.Read entering
[2013-04-10 19:42:27.943Z] [0001] Opening log
[2013-04-10 19:42:27.943Z] [0001] Log opened with write sharing
[2013-04-10 19:42:27.943Z] [0001] Skipping 0 nodes
[2013-04-10 19:42:27.974Z] [0001] Read node 1: XmlDeclaration xml=version="1.0" encoding="UTF-8"
[2013-04-10 19:42:27.974Z] [0001] Log contents:
<?xml version="1.0" encoding="UTF-8"?>
<session xmlns="http://winscp.net/schema/session/1.0" name="myuser@ftp.myftp.com" start="2013-04-11T01:42:27.912Z">

[2013-04-10 19:42:27.974Z] [0001] SessionLogReader.Read leaving
[2013-04-10 19:42:27.974Z] [0001] SessionLogReader.Read entering
[2013-04-10 19:42:27.974Z] [0001] Read node 2: Whitespace

[2013-04-10 19:42:27.974Z] [0001] Log contents has not changed
[2013-04-10 19:42:27.974Z] [0001] SessionLogReader.Read leaving
[2013-04-10 19:42:27.974Z] [0001] SessionLogReader.Read entering
[2013-04-10 19:42:27.974Z] [0001] Read node 3: Element session
[2013-04-10 19:42:27.974Z] [0001] Log contents has not changed
[2013-04-10 19:42:27.974Z] [0001] SessionLogReader.Read leaving
[2013-04-10 19:42:27.974Z] [0001] SessionLogReader.Read entering
[2013-04-10 19:42:27.974Z] [0001] Read node 4: Whitespace

[2013-04-10 19:42:27.974Z] [0001] Log contents has not changed
[2013-04-10 19:42:27.974Z] [0001] SessionLogReader.Read leaving
[2013-04-10 19:42:27.974Z] [0001] SessionLogReader.Read entering
[2013-04-10 19:42:27.974Z] [0001] Closing log
[2013-04-10 19:42:27.974Z] [0001] Error parsing session log file, but it is not closed yet, will retry
[2013-04-10 19:42:27.974Z] [0001] Waiting for log update and dispatching events for 125
[2013-04-10 19:42:27.974Z] [0001] Output: [winscp> option batch on]
[2013-04-10 19:42:27.974Z] [0001] Output: [batch on ]
[2013-04-10 19:42:27.974Z] [0001] Output: [winscp> option confirm off]
[2013-04-10 19:42:27.974Z] [0001] Output: [confirm off ]
[2013-04-10 19:42:27.974Z] [0001] Output: [winscp> open -hostkey="ssh-dss 1024 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx" -timeout=15 "sftp://myuser:******@ftp.myftp.com"]
[2013-04-10 19:42:27.974Z] [0001] Output: [Searching for host...]
[2013-04-10 19:42:28.052Z] [0003] ExeSessionProcess.ProcessEvent entering
[2013-04-10 19:42:28.052Z] [0003] Scheduling output: [Connecting to host...]
[2013-04-10 19:42:28.052Z] [0001] Output: [Connecting to host...]
[2013-04-10 19:42:28.052Z] [0003] ExeSessionProcess.ProcessEvent leaving
[2013-04-10 19:42:28.115Z] [0001] Opening log
[2013-04-10 19:42:28.115Z] [0001] Log opened with write sharing
[2013-04-10 19:42:28.115Z] [0001] Skipping 4 nodes
[2013-04-10 19:42:28.115Z] [0001] Closing log
[2013-04-10 19:42:28.115Z] [0001] Error parsing session log file, but it is not closed yet, will retry
[2013-04-10 19:42:28.115Z] [0001] Waiting for log update and dispatching events for 250
[2013-04-10 19:42:28.380Z] [0001] Opening log
[2013-04-10 19:42:28.380Z] [0001] Log opened with write sharing
[2013-04-10 19:42:28.380Z] [0001] Skipping 4 nodes
[2013-04-10 19:42:28.380Z] [0001] Closing log
[2013-04-10 19:42:28.380Z] [0001] Error parsing session log file, but it is not closed yet, will retry
[2013-04-10 19:42:28.380Z] [0001] Waiting for log update and dispatching events for 500
[2013-04-10 19:42:28.895Z] [0001] Opening log
[2013-04-10 19:42:28.895Z] [0001] Log opened with write sharing
[2013-04-10 19:42:28.895Z] [0001] Skipping 4 nodes
[2013-04-10 19:42:28.895Z] [0001] Closing log
[2013-04-10 19:42:28.895Z] [0001] Error parsing session log file, but it is not closed yet, will retry
[2013-04-10 19:42:28.895Z] [0001] Waiting for log update and dispatching events for 1000
[2013-04-10 19:42:28.988Z] [0003] ExeSessionProcess.ProcessEvent entering
[2013-04-10 19:42:28.988Z] [0003] Scheduling output: [Authenticating...]
[2013-04-10 19:42:28.988Z] [0003] ExeSessionProcess.ProcessEvent leaving
[2013-04-10 19:42:28.988Z] [0001] Output: [Authenticating...]
[2013-04-10 19:42:29.347Z] [0003] ExeSessionProcess.ProcessEvent entering
[2013-04-10 19:42:29.347Z] [0003] Scheduling output: [Using username "myuser".]
[2013-04-10 19:42:29.347Z] [0001] Output: [Using username "myuser".]
[2013-04-10 19:42:29.347Z] [0003] ExeSessionProcess.ProcessEvent leaving
[2013-04-10 19:42:29.456Z] [0003] ExeSessionProcess.ProcessEvent entering
[2013-04-10 19:42:29.456Z] [0003] Scheduling output: [Authenticating with pre-entered password.]
[2013-04-10 19:42:29.456Z] [0001] Output: [Authenticating with pre-entered password.]
[2013-04-10 19:42:29.456Z] [0003] ExeSessionProcess.ProcessEvent leaving
[2013-04-10 19:42:29.908Z] [0001] Opening log
[2013-04-10 19:42:29.908Z] [0001] Log opened with write sharing
[2013-04-10 19:42:29.908Z] [0001] Skipping 4 nodes
[2013-04-10 19:42:29.908Z] [0001] Closing log
[2013-04-10 19:42:29.908Z] [0001] Error parsing session log file, but it is not closed yet, will retry
[2013-04-10 19:42:29.908Z] [0001] Waiting for log update and dispatching events for 1000
[2013-04-10 19:42:30.002Z] [0003] ExeSessionProcess.ProcessEvent entering
[2013-04-10 19:42:30.002Z] [0003] Scheduling output: [Authenticated.]
[2013-04-10 19:42:30.002Z] [0003] ExeSessionProcess.ProcessEvent leaving
[2013-04-10 19:42:30.002Z] [0001] Output: [Authenticated.]
[2013-04-10 19:42:30.002Z] [0003] ExeSessionProcess.ProcessEvent entering
[2013-04-10 19:42:30.002Z] [0003] Scheduling output: [Starting the session...]
[2013-04-10 19:42:30.002Z] [0001] Output: [Starting the session...]
[2013-04-10 19:42:30.002Z] [0003] ExeSessionProcess.ProcessEvent leaving
[2013-04-10 19:42:30.111Z] [0003] ExeSessionProcess.ProcessEvent entering
[2013-04-10 19:42:30.111Z] [0003] Scheduling output: [Reading remote directory...]
[2013-04-10 19:42:30.111Z] [0003] ExeSessionProcess.ProcessEvent leaving
[2013-04-10 19:42:30.111Z] [0001] Output: [Reading remote directory...]
[2013-04-10 19:42:30.220Z] [0003] ExeSessionProcess.ProcessEvent entering
[2013-04-10 19:42:30.220Z] [0003] Scheduling output: [Session started.]
[2013-04-10 19:42:30.220Z] [0003] ExeSessionProcess.ProcessEvent leaving
[2013-04-10 19:42:30.220Z] [0001] Output: [Session started.]
[2013-04-10 19:42:30.220Z] [0003] ExeSessionProcess.ProcessEvent entering
[2013-04-10 19:42:30.220Z] [0003] Scheduling output: [Active session: [1] myuser@ftp.myftp.com]
[2013-04-10 19:42:30.220Z] [0001] Output: [Active session: [1] myuser@ftp.myftp.com]
[2013-04-10 19:42:30.220Z] [0003] ExeSessionProcess.ProcessEvent leaving
[2013-04-10 19:42:30.220Z] [0003] ExeSessionProcess.ProcessEvent entering
[2013-04-10 19:42:30.220Z] [0003] ExeSessionProcess.ProcessTitleEvent entering
[2013-04-10 19:42:30.220Z] [0003] Not-supported title event [myuser@ftp.myftp.com - WinSCP]
[2013-04-10 19:42:30.220Z] [0003] ExeSessionProcess.ProcessTitleEvent leaving
[2013-04-10 19:42:30.220Z] [0003] ExeSessionProcess.ProcessEvent leaving
[2013-04-10 19:42:30.220Z] [0003] ExeSessionProcess.ProcessEvent entering
[2013-04-10 19:42:30.220Z] [0003] ExeSessionProcess.ProcessEvent leaving
[2013-04-10 19:42:30.236Z] [0003] ExeSessionProcess.ProcessEvent entering
[2013-04-10 19:42:30.236Z] [0003] ExeSessionProcess.ProcessInputEvent entering
[2013-04-10 19:42:30.922Z] [0001] Opening log
[2013-04-10 19:42:30.922Z] [0001] Log opened with write sharing
[2013-04-10 19:42:30.922Z] [0001] Skipping 4 nodes
[2013-04-10 19:42:30.922Z] [0001] Read node 5: Element group
[2013-04-10 19:42:30.922Z] [0001] Log contents:
<?xml version="1.0" encoding="UTF-8"?>
<session xmlns="http://winscp.net/schema/session/1.0" name="myuser@ftp.myftp.com" start="2013-04-11T01:42:27.912Z">
<group name="-hostkey=&quot;ssh-dss 1024 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx&quot; -timeout=15 sftp://myuser:***@ftp.myftp.com" start="2013-04-11T01:42:30.220Z">
</group>

[2013-04-10 19:42:30.922Z] [0001] SessionLogReader.Read leaving
[2013-04-10 19:42:30.922Z] [0001] SessionLogReader.Read entering
[2013-04-10 19:42:30.922Z] [0001] Read node 6: Whitespace

[2013-04-10 19:42:30.922Z] [0001] Log contents has not changed
[2013-04-10 19:42:30.922Z] [0001] SessionLogReader.Read leaving
[2013-04-10 19:42:30.922Z] [0001] SessionLogReader.Read entering
[2013-04-10 19:42:30.922Z] [0001] Read node 7: EndElement group
[2013-04-10 19:42:30.922Z] [0001] Log contents has not changed
[2013-04-10 19:42:30.922Z] [0001] SessionLogReader.Read leaving
[2013-04-10 19:42:30.922Z] [0001] ElementLogReader.Dispose entering
[2013-04-10 19:42:30.922Z] [0001] ElementLogReader.ReadToEnd entering
[2013-04-10 19:42:30.922Z] [0001] ElementLogReader.ReadToEnd leaving
[2013-04-10 19:42:30.922Z] [0001] ElementLogReader.Dispose leaving
[2013-04-10 19:42:30.922Z] [0001] CallstackAndLock..ctor leaving
[2013-04-10 19:42:30.922Z] [0001] CallstackAndLock..ctor entering
[2013-04-10 19:42:30.922Z] [0001] Session.DoDispose entering
[2013-04-10 19:42:30.922Z] [0001] Session.Cleanup entering
[2013-04-10 19:42:30.922Z] [0001] Terminating process
[2013-04-10 19:42:30.922Z] [0001] Command: [exit]
[2013-04-10 19:42:30.922Z] [0001] ExeSessionProcess.ExecuteCommand entering
[2013-04-10 19:42:30.922Z] [0001] ExeSessionProcess.ExecuteCommand leaving
[2013-04-10 19:42:30.922Z] [0001] ExeSessionProcess.Close entering
[2013-04-10 19:42:30.922Z] [0001] Waiting for process to exit
[2013-04-10 19:42:30.922Z] [0003] Scheduling output: [winscp> exit]
[2013-04-10 19:42:30.922Z] [0003] ExeSessionProcess.ProcessInputEvent leaving
[2013-04-10 19:42:30.922Z] [0003] ExeSessionProcess.ProcessEvent leaving
[2013-04-10 19:42:31.172Z] [0001] ExeSessionProcess.Close leaving
[2013-04-10 19:42:31.172Z] [0001] ExeSessionProcess.Dispose entering
[2013-04-10 19:42:31.250Z] [0003] Aborted
[2013-04-10 19:42:31.250Z] [0003] ExeSessionProcess.ProcessEvents leaving
[2013-04-10 19:42:31.250Z] [0001] ExeSessionProcess.Dispose leaving
[2013-04-10 19:42:31.250Z] [0001] Disposing log readers
[2013-04-10 19:42:31.250Z] [0001] ElementLogReader.Dispose entering
[2013-04-10 19:42:31.250Z] [0001] ElementLogReader.ReadToEnd entering
[2013-04-10 19:42:31.250Z] [0001] SessionLogReader.Read entering
[2013-04-10 19:42:31.250Z] [0001] Read node 8: Whitespace

[2013-04-10 19:42:31.250Z] [0001] Log contents:
<?xml version="1.0" encoding="UTF-8"?>
<session xmlns="http://winscp.net/schema/session/1.0" name="myuser@ftp.myftp.com" start="2013-04-11T01:42:27.912Z">
<group name="-hostkey=&quot;ssh-dss 1024 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx&quot; -timeout=15 sftp://myuser:***@ftp.myftp.com" start="2013-04-11T01:42:30.220Z">
</group>
<group name="exit" start="2013-04-11T01:42:30.922Z">
</group>
</session>

[2013-04-10 19:42:31.250Z] [0001] SessionLogReader.Read leaving
[2013-04-10 19:42:31.250Z] [0001] SessionLogReader.Read entering
[2013-04-10 19:42:31.250Z] [0001] Read node 9: Element group
[2013-04-10 19:42:31.250Z] [0001] Log contents has not changed
[2013-04-10 19:42:31.250Z] [0001] SessionLogReader.Read leaving
[2013-04-10 19:42:31.250Z] [0001] SessionLogReader.Read entering
[2013-04-10 19:42:31.250Z] [0001] Read node 10: Whitespace

[2013-04-10 19:42:31.250Z] [0001] Log contents has not changed
[2013-04-10 19:42:31.250Z] [0001] SessionLogReader.Read leaving
[2013-04-10 19:42:31.250Z] [0001] SessionLogReader.Read entering
[2013-04-10 19:42:31.250Z] [0001] Read node 11: EndElement group
[2013-04-10 19:42:31.250Z] [0001] Log contents has not changed
[2013-04-10 19:42:31.250Z] [0001] SessionLogReader.Read leaving
[2013-04-10 19:42:31.250Z] [0001] SessionLogReader.Read entering
[2013-04-10 19:42:31.250Z] [0001] Read node 12: Whitespace

[2013-04-10 19:42:31.250Z] [0001] Log contents has not changed
[2013-04-10 19:42:31.250Z] [0001] SessionLogReader.Read leaving
[2013-04-10 19:42:31.250Z] [0001] SessionLogReader.Read entering
[2013-04-10 19:42:31.250Z] [0001] Read node 13: EndElement session
[2013-04-10 19:42:31.250Z] [0001] Log contents has not changed
[2013-04-10 19:42:31.250Z] [0001] SessionLogReader.Read leaving
[2013-04-10 19:42:31.250Z] [0001] ElementLogReader.ReadToEnd leaving
[2013-04-10 19:42:31.250Z] [0001] ElementLogReader.Dispose leaving
[2013-04-10 19:42:31.250Z] [0001] SessionLogReader.Dispose entering
[2013-04-10 19:42:31.250Z] [0001] Closing log
[2013-04-10 19:42:31.250Z] [0001] SessionLogReader.Dispose leaving
[2013-04-10 19:42:31.250Z] [0001] Deleting XML log file [C:\Users\ujimenez\AppData\Local\Temp\wscp03A8.0141B42A.tmp]
[2013-04-10 19:42:31.250Z] [0001] Session.Cleanup leaving
[2013-04-10 19:42:31.437Z] [0001] CPU Load [363.1768%]
[2013-04-10 19:42:31.437Z] [0001] Disposing logger, no more logging
uzzieljv
[View user's profile]

Joined: 2013-04-11
Posts: 7
. 2013-04-10 19:42:27.912 --------------------------------------------------------------------------
. 2013-04-10 19:42:27.912 WinSCP Version 5.1.4 (Build 3020) (OS 6.1.7600)
. 2013-04-10 19:42:27.912 Configuration: nul
. 2013-04-10 19:42:27.927 Local account: PT\ujimenez
. 2013-04-10 19:42:27.927 Working directory: C:\Users\ujimenez\Documents\Pruebas\SFTP Client WinSCP .NET Assembly\SFTP Client WinSCP .NET Assembly\bin\Debug
. 2013-04-10 19:42:27.927 Command-line: "C:\Users\ujimenez\Documents\Pruebas\SFTP Client WinSCP .NET Assembly\SFTP Client WinSCP .NET Assembly\bin\Debug\winscp.exe" /xmllog="C:\Users\ujimenez\AppData\Local\Temp\wscp03A8.0141B42A.tmp" /xmlgroups /nointeractiveinput /dotnet=514 /ini=nul /log="SessionLogPath" /console /consoleinstance=_936_174
. 2013-04-10 19:42:27.927 Time zone: Current: GMT-6, Standard: GMT-6, DST: GMT-6, DST Start: 30/12/1899, DST End: 30/12/1899
. 2013-04-10 19:42:27.927 Login time: mircoles, 10 de abril de 2013 07:42:27 p.m.
. 2013-04-10 19:42:27.927 --------------------------------------------------------------------------
. 2013-04-10 19:42:27.927 Session name: myuser@ftp.myftp.com (Ad-Hoc session)
. 2013-04-10 19:42:27.927 Host name: ftp.myftp.com (Port: 22)
. 2013-04-10 19:42:27.927 User name: myuser (Password: Yes, Key file: No)
. 2013-04-10 19:42:27.927 Tunnel: No
. 2013-04-10 19:42:27.927 Transfer Protocol: SFTP
. 2013-04-10 19:42:27.927 Ping type: -, Ping interval: 30 sec; Timeout: 15 sec
. 2013-04-10 19:42:27.927 Proxy: none
. 2013-04-10 19:42:27.927 SSH protocol version: 2; Compression: No
. 2013-04-10 19:42:27.927 Bypass authentication: No
. 2013-04-10 19:42:27.927 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2013-04-10 19:42:27.927 Ciphers: aes,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
. 2013-04-10 19:42:27.927 SSH Bugs: A,A,A,A,A,A,A,A,A,A
. 2013-04-10 19:42:27.927 SFTP Bugs: A,A
. 2013-04-10 19:42:27.927 Return code variable: Autodetect; Lookup user groups: A
. 2013-04-10 19:42:27.927 Shell: default
. 2013-04-10 19:42:27.927 EOL: 0, UTF: 2
. 2013-04-10 19:42:27.927 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
. 2013-04-10 19:42:27.927 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No
. 2013-04-10 19:42:27.927 Local directory: default, Remote directory: home, Update: Yes, Cache: Yes
. 2013-04-10 19:42:27.927 Cache directory changes: Yes, Permanent: Yes
. 2013-04-10 19:42:27.927 DST mode: 1; Timezone offset: 0h 0m
. 2013-04-10 19:42:27.927 --------------------------------------------------------------------------
. 2013-04-10 19:42:27.927 Looking up host "ftp.myftp.com"
. 2013-04-10 19:42:27.943 Connecting to xx.xxx.xxx.xxx port 22
. 2013-04-10 19:42:28.146 Server version: SSH-2.0-VShell_2_3_7_272 VShell
. 2013-04-10 19:42:28.146 Using SSH protocol version 2
. 2013-04-10 19:42:28.146 We claim version: SSH-2.0-WinSCP_release_5.1.4
. 2013-04-10 19:42:28.271 Doing Diffie-Hellman group exchange
. 2013-04-10 19:42:28.583 Doing Diffie-Hellman key exchange with hash SHA-1
. 2013-04-10 19:42:28.973 Verifying host key dss 0xb989daba607f7c318ccf77fff41948d276b7de61001b80bd3108173c08d03c159c56438449e30c1cb2 with fingerprint ssh-dss 1024 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx
. 2013-04-10 19:42:28.988 Host key matches configured key
. 2013-04-10 19:42:28.988 Host key fingerprint is:
. 2013-04-10 19:42:28.988 ssh-dss 1024 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx
. 2013-04-10 19:42:28.988 Initialised AES-256 CBC client->server encryption
. 2013-04-10 19:42:28.988 Initialised HMAC-SHA1 client->server MAC algorithm
. 2013-04-10 19:42:28.988 Initialised AES-256 CBC server->client encryption
. 2013-04-10 19:42:28.988 Initialised HMAC-SHA1 server->client MAC algorithm
! 2013-04-10 19:42:29.347 Using username "myuser".
. 2013-04-10 19:42:29.456 Prompt (7, SSH password, , &Password: )
. 2013-04-10 19:42:29.456 Using stored password.
. 2013-04-10 19:42:29.456 Sent password
. 2013-04-10 19:42:29.565 Access granted
. 2013-04-10 19:42:29.674 Opened channel for session
. 2013-04-10 19:42:30.002 Started a shell/command
. 2013-04-10 19:42:30.002 --------------------------------------------------------------------------
. 2013-04-10 19:42:30.002 Using SFTP protocol.
. 2013-04-10 19:42:30.002 Doing startup conversation with host.
> 2013-04-10 19:42:30.002 Type: SSH_FXP_INIT, Size: 5, Number: -1
< 2013-04-10 19:42:30.111 Type: SSH_FXP_VERSION, Size: 341, Number: -1
. 2013-04-10 19:42:30.111 SFTP version 4 negotiated.
. 2013-04-10 19:42:30.111 Unknown server extension newline@vandyke.com=0x000000020D0A
. 2013-04-10 19:42:30.111 Server requests EOL sequence "\r\n".
. 2013-04-10 19:42:30.111 File system roots:
. 2013-04-10 19:42:30.111 Unknown server extension default-fs-attribs@vandyke.com=0x00000001000000095C2F31700000004434F4D3100000004434F4D32000000044344434F4D3600000004434F4D3700000004434F4D3800000004434F4D39000000044C505431000000044C505432000000044C505433000000044C505434000000044C505435000000044C505436000000044C505437000000044C00034E554C00000006434C4F434B24
. 2013-04-10 19:42:30.111 We will use UTF-8 strings when appropriate
. 2013-04-10 19:42:30.111 Getting current directory name.
. 2013-04-10 19:42:30.111 Getting real path for '.'
> 2013-04-10 19:42:30.111 Type: SSH_FXP_REALPATH, Size: 10, Number: 16
< 2013-04-10 19:42:30.220 Type: SSH_FXP_NAME, Size: 28, Number: 16
. 2013-04-10 19:42:30.220 Real path is 'myuser:'
. 2013-04-10 19:42:30.220 Startup conversation with host finished.
< 2013-04-10 19:42:30.220 Script: Active session: [1] myuser@ftp.myftp.com
> 2013-04-10 19:42:30.922 Script: exit
. 2013-04-10 19:42:30.922 Script: Exit code: 0
. 2013-04-10 19:42:30.922 Closing connection.
. 2013-04-10 19:42:30.922 Sending special code: 12
. 2013-04-10 19:42:30.922 Sent EOF message
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24538
Location: Prague, Czechia
uzzieljv wrote:
Hello
To me it is the same.
Can you help me?
These are the files.

The logs seem to span only 4 seconds. Can you record times before and after you create the Session class?
_________________
Martin Prikryl
uzzieljv
[View user's profile]

Joined: 2013-04-11
Posts: 7
Hi Martin thank you very much for answering.

According to me, the two logs are created after instantiate the class session. That is why there is no big difference.

Post my Time Register:

My Code:

try
{
WinSCP.SessionOptions OpcionesCliente = new WinSCP.SessionOptions
{
Protocol = Protocol.Sftp,
HostName = "ftp.myftp.com",
UserName = "MyUser",
Password = "Password",
SshHostKeyFingerprint = "ssh-dss 1024 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx"
};

DateTime currentTime = DateTime.Now;
Console.WriteLine("Current Time: {0}", currentTime);
Console.WriteLine("Instantiate the Session class: Session Cliente = new Session()");

using (Session Cliente = new Session()) //////////// LINE WHICH TAKES A LONG TIME
{
currentTime = DateTime.Now;
Console.WriteLine("Session Object Created");
Console.WriteLine("Current Time: {0}", currentTime);

Cliente.DebugLogPath = "DebugLogPath";
Cliente.SessionLogPath = "SessionLogPath";

// Abriendo Conexin
Cliente.Open(OpcionesCliente);
Console.WriteLine("Successful connection to ftp server");

// Descarga de Archivos
TransferOptions transferOptions = new TransferOptions();
transferOptions.TransferMode = TransferMode.Binary;

TransferOperationResult transferResult;
transferResult = Cliente.GetFiles("/Reports/", @"C:\download\*", false, transferOptions);
transferResult.Check();
Console.WriteLine("Success to Get Files");
}
}
catch (Exception e)
{
Console.WriteLine("Error: {0}", e);
}

Console.WriteLine("Connection Closed");
Console.ReadLine();


Attached Image with result

[/img]

Thank You.
Times.jpg (25.23 KB)

Description: Time Register.

Times.jpg

uzzieljv
[View user's profile]

Joined: 2013-04-11
Posts: 7
I Replace the library by the Beta (WinSCP 520 Beta), and it works.

Still having the problem that takes a long time, but now in the following line:
Cliente.DebugLogPath = "DebugLog";
Which to remove it without take as long as it works.

This line works well (do not need to remove it):
Cliente.SessionLogPath = "SessionLog";

It seems that the problem is with the Debug Log.

Good day.
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