Post a reply

Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)


Topic review


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 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:

WinSCPnet error '80004003' Object reference not set to an instance of an object.


Can anyone see what's going on with my connection, seems to be connecting to the server, but then fails to complete the connection negotiation?

Thanks in advance! :)

Classic ASP / VBScript:
Dim sessionOptions
Set sessionOptions = Server.CreateObject("WinSCP.SessionOptions")
With sessionOptions
.Protocol = 1 '1=SCP
' .Protocol = Protocol_Scp
.FtpMode = 1 '0 Passive, 1 Active
.HostName = ""
.UserName = "admin"
.Password = "P@ssw0rd"
.GiveUpSecurityAndAcceptAnySshHostKey = "true"
.TimeoutInMilliseconds = 60000
' .SshHostKeyFingerprint = "ssh-rsa 2048 81:58:4b:b7:0b:7a:56:e1:1a:7e:e4:17:79:c7:34:ea"
End With

'response.write sessionOptions.FtpMode

Dim sessiona
Set sessiona = Server.CreateObject("WinSCP.Session")
sessiona.DebugLogPath = "C:\Data\WorkFlow\TempFiles\DebugLog2.txt"
sessiona.DebugLogLevel = 1
sessiona.sessionLogPath = "C:\Data\WorkFlow\TempFiles\SessionLog2.txt"
' Connect

' Disconnect, clean up