-
Notifications
You must be signed in to change notification settings - Fork 791
I've added SFTP support via SSH.NET to this project #559
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
You can share your build on the support portal here. |
@alphadon Greetings from Germany |
@pAtMaN-bcassa, I have shared my source with @ravibpatel per the direction above. It is currently targeted at ,NET 6.0 which we are using for the project we needed it for, so I do not have an actual pull request prepared to merge it in as it could be a breaking change for others, or at minimum require some extra work to make SFTP support seamless for all supported environments. Please PM me with your email address or a file share link and I can provide the code to you. The ZIP is about 1MB. |
@alphadon Can you share it again? I didn't get the email, or I missed it. |
I've re-sent my contact info and another attempt at attaching the archive via User Voice support. |
@alphadon Thanks for the fast reply. I need this for older projects which were develpped in .NETFramework 4.7.2, but I think I can manage that. I don't knwo how to send a private message here so here is my private email address: xxxxxxxxxxxxx |
@pAtMaN-bcassa, were you able to get a build and test it for your .NET Framework 4.7.2 needs? I did not have time or access to an SFTP server to fully test the updates, but I'd like to hear if you were successful or ran in to any issues. If you were able to get SFTP working, please contribute any additional improvements back to the project. |
Hi,
sorry for the late feedback, have been very busy.
I have migrated the code down to .net framework 4.7.2 and have tested it with different sftp servers and it works fine.
Also the code of yours in .net 6 works fine.
The only small bug was the percentage calculation of the progress bar in the event "OnDownloadProgressChanged" in your class "MySSHClient".
wrong line > int percent = (int)bytesReceived / (int)RemoteFileInfo.Size;
int percent = Convert.ToInt32(((float)bytesReceived / (float)RemoteFileInfo.Size) * 100);
Thanks again for the support and attached is the zip file with my code in 4.7.2
Greetings from Germany
Patrick Christ
|
With minimal refactoring of the handling of the downloads, I've added the ability to use SFTP to retrieve the XML configuration and download file (MSI file in my case) from a Secure FTP server. My build takes a dependency on SSH.NET and has logging integrated as well (NLog) to assist in debugging during development.
A few things would need attention before considering this a complete enhancement:
Possibly other issues exist that I'm forgetting here... I can tell you that this works perfectly (asynchronously) via SFTP to run updates in a .NET 6.0 Windows Desktop (WinForms) application.
@ravibpatel, I'd be happy to share my build with you privately if you have an interest in resolving the issues above, including extending the product to accept different providers for HTTP(S), SFTP, Azure Blob, S3, etc. sources. These would likely need to be in the form of an extension module that allows a developer to only install the support needed for their implementation, without taking an unnecessary dependency on other infrastructure.
The text was updated successfully, but these errors were encountered: