在.NET C#程序中,从FTP过渡到SFTP容易吗?

发布于 2024-07-22 18:34:20 字数 288 浏览 4 评论 0原文

在.NET C#程序中,从FTP过渡到SFTP容易吗? 我试图了解承包商需要多长时间才能完成过渡。 我个人的经验主要是使用PHP,所以我不知道。

基本上,我在说什么,必须采取哪些步骤? 显然,命令不同,但是代码本身还有其他内容吗? 例如命令是否需要不同的格式等?

另外,如果有人有所有 .NET/C# FTP 和 SFTP 命令的列表,那将非常有帮助。

根据要求进行说明:该程序正在将极小的文件 (20 KB) 上传到服务器。 我所说的格式是指视觉上的,因为我想知道查找/替换工作。

In a .NET C# program, is it easy to transition from FTP to SFTP? I'm trying to get a sense of how muh time it would take the contractor to make the transition. My personal experience is mostly with PHP, so I have no idea.

Basically, what I'm talking about, what steps would have to be made? Obviously, different commands, but would anything else in the code itself? Like do the commands require different formats, etc.?

Also, if anyone has a list of all the .NET/C# FTP and SFTP commands, that would be really helpful.

Clarification, as requested: The program is uploading extremely small files (20 KB) to a server. By format, I mean visually, because I was wondering about a find/replace job.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

差↓一点笑了 2024-07-29 18:34:21

这实际上取决于您的开发人员使用什么 C# 库来实现 FTP。

例如,如果他们使用 edtFTPnet(一个广泛使用的开源库),如果您将其替换为 edtFTPnet/PRO,那么升级路径就很简单了。 PRO 版本具有相同的 API,只需要几行额外的代码。

It really depends on what C# library your developer has used to implement FTP.

If, for example, they used edtFTPnet, a widely available open source library, then the upgrade path is trivial if you replace it with edtFTPnet/PRO. The PRO version has the identical API and just a few extra lines of code would be needed.

厌味 2024-07-29 18:34:21

您需要考虑的一件事是您当前的代码编写得如何。 如果您现有的 FTP 实现是设计得非常糟糕的意大利面条式代码,那么将其转换为 SFTP 可能几乎是不可能的,并且花费的时间比您想要的要长。 如果不知道代码的当前状态,任何人都很难做出良好的估计。 即使您确实从这个网站上的人那里得到了估计,我也不建议相信它(即使这个网站上的人很棒),因为如果没有他们面前的所有信息,任何人都几乎不可能得出可靠的估计。

也许您应该考虑聘请一位优秀的顾问或业务分析师来为您进行全面的评估。

One thing that you'd need to consider is how well your current code is written. If your existing FTP implementation is horribly designed spaghetti code then converting it to SFTP may be next to impossible and take way longer than you'd like. Without knowing the current state of the code, it would be difficult for anyone to make a good estimation. And even if you do get an estimation from people on this site, I wouldn't recommend trusting it (even though the people on this site are great) since without all the information in front of them it will be next to impossible for anyone to come up with a reliable estimate.

Perhaps you should consider hiring a good consultant or business analyst to do a thorough estimate for you.

偏闹i 2024-07-29 18:34:21

我一直走这条路。

这取决于情况,但请记住,SFTP、FTP-SSL 和 FTP 是不同的。
如果他自己编写 SFTP 库,则需要一两个月的时间,因为要使其完美且兼容需要做大量工作。 但他不应该这样做。

简而言之,让他使用外部库来添加 SFTP 功能。 这会让它变得很短。 也许是一两周的全职工作,但这取决于工作的参与程度。 有开源选项。但是,只需花费 50-150 美元,您就可以获得维护良好、非常易于使用的代码的许可证。 将为他节省几天的工作时间。
上面有链接,但我会看看:
自由的:
http://www.enterpriset.com/products/edtftpnet/overview.html

商业的:
http://www.weonlydo.com/

I've been down this road.

It depends, but keep in mind that SFTP, FTP-SSL and FTP are different.
If he's writing the SFTP libraries himself, a month or two, since it's a lot of work to make it perfect and compatible. But he should NOT do that.

In short, get him to use an external library to add SFTP functionality. This will make it pretty short. Maybe a week or two of full-time work, but it depends on how involved it is. There's open-source options.. But for $50-150 you can get a license to well-maintained code that's really easy to use. will save him days of work.
There's links above, but I'd look at:
Free:
http://www.enterprisedt.com/products/edtftpnet/overview.html

Commercial:
http://www.weonlydo.com/

爱人如己 2024-07-29 18:34:20

这是一个相当模糊的问题。 您还没有告诉我们 C# 程序如何使用 FTP。 它是服务器、客户端、目录列表、上传 100 GB 文件吗? 它使用什么库?

根据 此论坛帖子< /a> ,.NET 中没有对 SFTP 的内置支持,因此您必须使用第三方库,例如 SharpSSH格拉纳多斯 SSH

我真的不知道你的意思,“命令是否需要不同的格式”。 显然,代码将使用不同的:

  1. 类型
  2. Wire 协议。

由于库的抽象,它显然看起来有些相似。 我建议您提供更多信息和更清晰的问题。

This is a pretty vague question. You haven't told us what the C# program is doing with FTP. Is it a server, is it a client, is it doing directory listings, is it uploading 100 GB files? What library is it using?

According to this forum post , there is no built-in support for SFTP in .NET, so you would have to use third-party libraries such as SharpSSH or Granados SSH.

I don't really know what you mean, "do the commands require different formats". Obviously, the code will use different:

  1. Libraries
  2. Types
  3. Wire protocol.

It will obviously appear somewhat similar, thanks to the abstraction of the libraries. I suggest you provide more information, and a clearer question.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文