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

Advertisement

gsuk
Guest

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

Hi,

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 = "192.168.207.100"
.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
sessiona.Open(sessionOptions)


' Disconnect, clean up
sessiona.Dispose
================

Reply with quote

Advertisement

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

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:
https://winscp.net/tracker/1744

Reply with quote

Advertisement

You can post new topics in this forum