Post a reply

Options
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)

Options

Topic review

martin

WinSCP can run on any version of .NET starting with 2.0.
Sorry, I do not know how to help you.
wademoses

I just uninstalled .Net 4.7, rebooted, reinstalled .Net 4.7, and re-registered the .DLL for 32 & 64 bit successfully. I am still getting the same error.

Does WinSCP COM need an older version of .Net? .Net 4.7 is the only version I see that is intended to run on Server 2016.
martin

Re: Error with SessionOptions

Googling for "error 80131700", it seems that it's related to broken installation of .NET framework. Try to reinstall/fix it.
wademoses

Error with SessionOptions

Using WinSCP 5.11.2 on Windows Server 2016

I just moved from WinSCP 5.9.3 on a Windows Server 2008 R2 which ran the .Net Assembly and COM library beautifully from Access 2010 32-bit (VBA).
Now on a Windows 2016 server with Access 2010 32-bit (VBA), I have tried WinSCP 5.9.3 and 5.11.2 and cannot get past opening the SessionOptions. WinSCP GUI works perfectly when I run it manually (I can connect to multiple FTP sites and transfer files). But using the .Net Assembly/COM files from VBA causes the error below. This appears to me to be an issue with registering the .dll file or adding the Reference to it but I cannot get it to work.

Here is the VBA code:

Dim SessionOptions As New SessionOptions
With SessionOptions <<------------------- Error happens here
.Protocol = Protocol_Sftp
.hostName = vFTPServ
.username = vUser
.password = vPass
.SshHostKeyFingerprint = "ssh-rsa 1024 3a:a8:c2:c0:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:60:be"
End With


Here is the error:

Run-time error '-2146232576 (80131700)':
Automation error

SessionOptions = <Object variable or With block variable not set>

Things I have already tried:
- Registered and Unregistered the .dll files successfully many times using the online examples:

%WINDIR%\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe WinSCPnet.dll /codebase /tlb:WinSCPnet32.tlb
%WINDIR%\Microsoft.NET\Framework64\v4.0.30319\RegAsm.exe WinSCPnet.dll /codebase /tlb:WinSCPnet64.tlb

- Re-selected the Reference to the WinSCP Scripting Interface .Net Wrapper
- Made sure the .dll, .tlb, and WinSCP.exe files are all in the same folder.
- Rebooted the server
- I checked the log file but nothing gets logged this early in the process. (Manually running WinSCP does log connections just fine.)

Help! WinSCP is wonderful when it is working!