FtpWebRequest SIZE命令-设置二进制模式的能力 [英] FtpWebRequest SIZE Command - ability to set binary mode

查看:76
本文介绍了FtpWebRequest SIZE命令-设置二进制模式的能力的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建从FTP下载和上传文件的应用程序,基本操作.
现在,我每次尝试从FTP位置获取文件大小时,都会收到550错误.

I'm building application that downloads and uploads files from FTP, basic operations.
Right now I'm trying to get file size from FTP location, every time I try to do that I get 550 error.

我发现了2007年以来的旧线程:https://social.msdn.microsoft.com/Forums/en-US/0c38814e-d8e3-49f3-8818-b5306cc100ce/ftpwebrequestusebinary-does-not-work?forum = netfxnetcom

I found old thread from 2007: https://social.msdn.microsoft.com/Forums/en-US/0c38814e-d8e3-49f3-8818-b5306cc100ce/ftpwebrequestusebinary-does-not-work?forum=netfxnetcom

因为它已被锁定,所以我无法回复.

because it is locked I can't reply to it.

@Mariya说:

感谢您的评论.我们很清楚FtpWebRequest的当前限制.我们已经收到了许多更改FtpWebRequest的设计的请求-主要抱怨是它不能灵活发送某些命令 独立:例如TYPE,PWD,CWD等...,这导致用户没有完全的控制权.该问题将在以后的版本中修复.

Thank you for your comments. We are well aware of the current limitations of the FtpWebRequest. We have had numerous requests for changing the design of FtpWebRequest - the main complaint being that it does not provide flexibility to send certain commands independently: like TYPE, PWD, CWD, etc.... which results in users not having complete control. This will be fixed in a future release.

Mariya

我正在使用.NET 4.6,但仍然出现相同的错误.
从那以后有什么改变吗?这终于解决了吗?除了使用商业库,是否有其他解决方法?

I'm using .NET 4.6 and I still get same error.
Has anything changed since then? Is this finally fixed? Are there any workarounds, except using commercial libraries?

很抱歉,我正在创建新线程,但正如我在锁定原始线程之前所写的那样.

Sorry that I'm creating new thread but as I wrote before original thread is locked.

推荐答案

您好,Tomasz Jag usz,

>>现在,我每次尝试从FTP位置获取文件大小时都会出现550错误.

>>Right now I'm trying to get file size from FTP location, every time I try to do that I get 550 error.

能否请您提供更多信息,例如相关代码和相关文件,我们将在您的立场上重现您的问题,并尝试找到解决方案.

Could you please provide a bit more information, such as related code and related file, we'll reproduce your issue on our side and try to find a solution to resolve it.

最诚挚的问候,

吴可乐


这篇关于FtpWebRequest SIZE命令-设置二进制模式的能力的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆