problem with xml log file

Advertisement

wiglekm
Joined:
Posts:
2
Location:
OH

problem with xml log file

I've put your sample code out on my webserver but kept getting a permissions error on the log files. After digging into this, I've discovered the following:

I have my code as:
session.DebugLogPath = "c:\inetpub\slashapps\writeoffs\sftp\debug.log"
session.SessionLogPath = "c:\inetpub\slashapps\writeoffs\sftp\session.log"
session.XmlLogPath = "c:\inetpub\slashapps\writeoffs\sftp\xml.log"
session.Open(sessionOptions)
' code fails right after this open command

The writeoffs\sftp folder is setup so that the network service this is running under has permission to make changes. When the code runs, the debug.log file is created. So far, so good. But I get an error when the xml log file is created:

Timeout waiting for WinSCP to respond - Log file c:\inetpub\slashapps\writeoffs\sftp\xml.log was not created in time, please make sure WinSCP has write permissions to the folder

I've set a much longer timeout interval and it still fails. I'd like to just skip the xml log but when I set it to null, it still tries to create it. If I leave out the xmllogpath, it tries to create the xml log file in the c:\windows\temp folder and fails just like it does anywhere else. The other log file works fine so I know the permissions are correct. Any ideas on why the xml one fails? Any way I can force it to not create itself or even ignore the error?

Here is the bottom part of the debug.log:

[2013-05-21 14:25:43.508Z] [0007] Starting "C:\inetpub\slashApps\bin\winscp.exe"
/xmllog="c:\inetpub\slashapps\writeoffs\sftp\xml.log" /xmlgroups /nointeractiveinput /dotnet=515
/ini=nul /log="c:\inetpub\slashapps\writeoffs\sftp\session.log" /console /consoleinstance=_968_83
[2013-05-21 14:25:43.508Z] [0007] Started process 1676
[2013-05-21 14:25:43.508Z] [0012] ExeSessionProcess.ProcessEvents entering
[2013-05-21 14:25:43.523Z] [0007] ExeSessionProcess.InitializeChild leaving
[2013-05-21 14:25:43.523Z] [0007] ExeSessionProcess.Start leaving
[2013-05-21 14:25:43.523Z] [0007] Command: [option batch on]
[2013-05-21 14:25:43.523Z] [0007] ExeSessionProcess.ExecuteCommand entering
[2013-05-21 14:25:43.523Z] [0007] ExeSessionProcess.ExecuteCommand leaving
[2013-05-21 14:25:43.523Z] [0007] Command: [option confirm off]
[2013-05-21 14:25:43.523Z] [0007] ExeSessionProcess.ExecuteCommand entering
[2013-05-21 14:25:43.523Z] [0007] ExeSessionProcess.ExecuteCommand leaving
[2013-05-21 14:25:43.523Z] [0007] Session.SessionOptionsToOpenArguments entering
[2013-05-21 14:25:43.523Z] [0007] Session.SessionOptionsToOpenSwitches entering
[2013-05-21 14:25:43.523Z] [0007] Session.SessionOptionsToOpenSwitches leaving
[2013-05-21 14:25:43.523Z] [0007] Session.SessionOptionsToOpenArguments leaving
[2013-05-21 14:25:43.523Z] [0007] Command: [open -hostkey="ssh-rsa key" -timeout=15 "sftp://username:password@website"]
[2013-05-21 14:25:43.523Z] [0007] ExeSessionProcess.ExecuteCommand entering
[2013-05-21 14:25:43.523Z] [0007] ExeSessionProcess.ExecuteCommand leaving
[2013-05-21 14:26:43.525Z] [0007] Exception: System.TimeoutException: Timeout waiting for WinSCP to respond - Log file c:\inetpub\slashapps\writeoffs\sftp\xml.log was not created in time, please make sure WinSCP has write permissions to the folder
at WinSCP.Session.CheckForTimeout(String additional)
at WinSCP.Session.Open(SessionOptions sessionOptions)
[2013-05-21 14:26:43.525Z] [0007] Session.Cleanup entering
[2013-05-21 14:26:43.525Z] [0007] Terminating process
[2013-05-21 14:26:43.525Z] [0007] Command: [exit]
[2013-05-21 14:26:43.525Z] [0007] ExeSessionProcess.ExecuteCommand entering
[2013-05-21 14:26:43.525Z] [0007] ExeSessionProcess.ExecuteCommand leaving
[2013-05-21 14:26:43.525Z] [0007] ExeSessionProcess.Close entering
[2013-05-21 14:26:43.525Z] [0007] Waiting for process to exit
[2013-05-21 14:26:44.525Z] [0007] Killing process
[2013-05-21 14:26:44.525Z] [0007] ExeSessionProcess.Close leaving
[2013-05-21 14:26:44.525Z] [0007] ExeSessionProcess.Dispose entering
[2013-05-21 14:26:44.556Z] [0012] Aborted
[2013-05-21 14:26:44.556Z] [0012] ExeSessionProcess.ProcessEvents leaving
[2013-05-21 14:26:44.556Z] [0007] ExeSessionProcess.Dispose leaving
[2013-05-21 14:26:44.556Z] [0007] Disposing log readers
[2013-05-21 14:26:44.556Z] [0007] Session.Cleanup leaving
[2013-05-21 14:26:44.556Z] [0007] CallstackAndLock..ctor leaving
[2013-05-21 14:26:44.556Z] [0007] CallstackAndLock..ctor entering
[2013-05-21 14:26:44.556Z] [0007] Session.DoDispose entering
[2013-05-21 14:26:44.556Z] [0007] Session.Cleanup entering
[2013-05-21 14:26:44.556Z] [0007] Disposing log readers
[2013-05-21 14:26:44.556Z] [0007] Session.Cleanup leaving
[2013-05-21 14:26:44.556Z] [0007] CPU Load [199.7649%]
[2013-05-21 14:26:44.556Z] [0007] Disposing logger, no more logging

Thanks for your help. I really like WinSCP so far. I removed the key, username, and password from the log above but I can connect using WinSCP without any problems. It is only the .net assembly that is causing some issues with log files.

Ken

Reply with quote E-mail

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
40,476
Location:
Prague, Czechia

Re: problem with xml log file

What version of WinSCP are you using? Please try with 5.2.1 beta and attach a complete debug log.

You cannot disable the XML log, WinSCP .NET assembly needs it.

Reply with quote

wiglekm
Joined:
Posts:
2
Location:
OH

update on error

I was using v 5.1.5 and have now upgraded to the 5.2.1 beta along with beta .net components. Still get same result. Debug log writes to file without problems while xml log fails. I am attaching the internet explorer message and the debug log (with ftp site info commented out). Thanks for your help

Ken Wigle

p.s. sorry if this comes through more than once - my reply was not showing in the forum when I tried it earlier

Reply with quote E-mail

marquezcuerpo
Joined:
Posts:
1

Hi,

I have exactly the very same problem. Everything is just working fine except the XML logging.

I keep receiving the next error in my log:
"Log file C:\Users\user_name\AppData\Local\Temp\wscp2D04.00C99E5E.tmp was not created in time, please make sure WinSCP has write permissions to the folder"

When making transfers from the GUI works perfectly and XML logging is not necessary in there. It's just deactivated, why is it not possible to deactivate it for the assembly?

If would be a great help if anybody can tell how to solve this issue. Is there any work around?

I am working on a server process which is logged as an admin user so it has proper rights to pretty much everywhere and I already double checked in that folder.

Thanks a lot in advance.

Alex

Reply with quote

Advertisement

You can post new topics in this forum