Topic "SessionRemoteException: Operation not supported."

Author Message
rajesh.kannan
[View user's profile]

Joined: 2015-03-18
Posts: 1
Location: Chennai, India
I was using WINSCP.net library and when I tried to calculate the checksum value for a file at the sftp server, it can't and throws an exception as operation not supported. I have mentioned the algorithm as sha-1 and the code used is shown below.
Code:
session.CalculateFileChecksum("sha-1", "./" + file.Name);

There are no problem at sftp server as I can download the files and access them very well.

WINSCP version: 5.7

Have I done anything wrong over there.

Please help me on this and let me know how to fix this.

Thanks in advance.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
WinSCP does not download the file to calculate the checksum locally. It asks the server to calculate it remotely. But your SFTP server does not support "check-file" SFTP extension.
See https://winscp.net/eng/docs/protocols

If you want to calculate the checksum locally, download the file and use SHA1.ComputeHash:
https://msdn.microsoft.com/en-us/library/system.security.cryptography.sha1.computehash.aspx

See also https://winscp.net/eng/docs/library_example_verify_file_checksum
_________________
Martin Prikryl
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