Topic "WinSCP .NET assembly - Issue with connection via Perl"

Author Message
unknownme

Guest


Hi,

I have downloaded and registered the COM using http://winscp.net/eng/docs/library_install, the tlb file is also registered successfully on my Windows box.

I tested the WinSCP.exe with the SFTP connection and it works perfectly.

However, my requirement is to automate it through Perl. I have gone through http://winscp.net/eng/docs/library#perl and tried to test the same code (by PUTting local file on my machine to remote server which I can do it via WinSCP.exe).

I tried to use "GiveUpSecurityAndAcceptAnySshHostKey" and also later removed this key and used the actual SSH Key with "SshHostKeyFingerprint". In both the cases, I am getting NULL $transferResult (error: Can't call method "Check" on an undefined value at mytest.pl line XX.)

The code is exactly same as in example (with changes to actual file location).

Can someone point out what is missing here or what should be done in order to achieve automation via Perl?
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
I do not do Perl. So I cannot really help you.

I'm not sure what happens, if one of the methods (.Open or .PutFiles) throws an exception.
Did you try check for that?

I've found this post: What is the best way to handle exceptions in Perl?
unknownme

Guest


prikryl wrote:
I do not do Perl. So I cannot really help you.

I'm not sure what happens, if one of the methods (.Open or .PutFiles) throws an exception.
Did you try check for that?

I've found this post: What is the best way to handle exceptions in Perl?


Hi,

Thanks for the quick response.
Yes, i tried to catch errors, while open session and others, no such errors shown. That is the reason I am surprised. I tried to catch properties of TransferOperationResult, but same issue.

If you have some across any such issues (not with Perl but other language maybe), that may help here?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
No I didn't see such problem before.

Please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate log file, set Session.SessionLogPath. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License