Unable to create log file error

Advertisement

Lee M
Guest

Unable to create log file error

Using WinSCP .NET assembly, I'm getting this error:
2021-05-04 15:24:39,529 [1] ERROR Helpers.SftpProcessor - WinSCP.SessionLocalException: WinSCP process terminated with exit code 1. Error output was "Can't open log file 'C:\Users\Lee M\AppData\Local\Temp\2\wscp2FB8.0259F9D2.tmp'.
System Error. Code: 2.
The system cannot find the file specified
Error occurred during logging. Cannot continue.". Response log file C:\Users\Lee M\AppData\Local\Temp\2\wscp2FB8.0259F9D2.tmp was not created. This could indicate lack of write permissions to the log folder or problems starting WinSCP itself.
at WinSCP.Session.Open(SessionOptions sessionOptions)
at Helpers.SftpProcessor.SetUpRemoteFolderStructure() in C:\Repos\SftpProcessor\Main\SftpProcessor\Helpers\SftpProcessor.cs:line 291
It works if I run the command prompt as administrator. Is there a way to change the location WinSCP uses to log?
Thanks,
Lee

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,040
Location:
Prague, Czechia

Re: Unable to create log file error

Wouldn't it be better to fix your local account set up? You must have other problems, if its TEMP point to a folder that does not exist.
Anyway, there's an undocumented Session.XmlLogPath property.

Reply with quote

Advertisement

You can post new topics in this forum