Re: WinSCPnet error '80004003' Object reference not set to an instance of an object.
It seems that the process does not have a write access to
WinSCP should have reported a more meaningful error message, which might have lead you to this solution. But there's a bug that prevented that:
https://winscp.net/tracker/1744
TEMP
folder. Try setting Session.XmlLogPath
to point to a folder, where you have a write access too, like C:\Data\WorkFlow\TempFiles\something.xml
WinSCP should have reported a more meaningful error message, which might have lead you to this solution. But there's a bug that prevented that:
https://winscp.net/tracker/1744