可以通过 Filezilla 显式 ftps,但不能从代码中显式 ftps
正如标题所述,我可以通过 FileZilla 客户端从我的服务器连接到另一台计算机,但我不能通过代码(.Net - FTPWebRequest)
我知道代码很好,因为它可以在另一台计算机上工作。我遇到问题的特定机器位于 NAT 之后,但 SA 已为来自我们尝试与之通信的主机的流量打开所有端口。
有什么建议吗——我错过了一些明显的事情吗?
我从尝试的连接中得到的异常是:
“无法从 传输连接:一个连接 尝试失败,因为已连接 当事人在事后没有做出适当的回应 一段时间,或既定的 连接失败,因为已连接 主机未能响应。”
并且,我们尝试连接的计算机的日志显示:
2010 年 7 月 26 日 12:40:23 PM -(不是 已登录)(xx.xx.xxx.xxx)>已连接, 正在发送欢迎消息...
2010 年 7 月 26 日 12:40:23 PM -(不是 已登录)(xx.xx.xxx.xxx)> 220-FileZilla 服务器版本 0.9.32 测试版
2010 年 7 月 26 日 12:40:23 PM -(不是 已登录)(xx.xx.xxx.xxx)> 220 ftp.xxxxxxxxxxxx.com
2010 年 7 月 26 日 12:40:23 PM -(不是 已登录)(xx.xx.xxx.xxx)>身份验证 TLS
2010 年 7 月 26 日 12:40:24 PM -(不是 已登录)(xx.xx.xxx.xxx)> 234 使用 身份验证类型 TLS
2010 年 7 月 26 日 12:41:24 PM -(不是 已登录)(xx.xx.xxx.xxx)>第421章 登录 时间超过。合闸控制 连接。
2010 年 7 月 26 日 12:41:24 PM -(不是 已登录)(xx.xx.xxx.xxx)> 已断开连接。
As the title states, I can connect to another machine from my server via FileZilla Client, but I cannot via code (.Net - FTPWebRequest)
I know the code is good, as it works from another machine. The particular machine I am having trouble with is behind a NAT, but the SA has opened all ports for traffic from the host we are trying to talk to.
Any suggestions - have I missed something obvious?
The exception I get from the attempted connection is:
"Unable to read data from the
transport connection: A connection
attempt failed because the connected
party did not properly respond after a
period of time, or established
connection failed because connected
host has failed to respond."
And, the logs from the machine we are trying to connect show:
7/26/2010 12:40:23 PM - (not
logged in) (xx.xx.xxx.xxx)> Connected,
sending welcome message...7/26/2010 12:40:23 PM - (not
logged in) (xx.xx.xxx.xxx)>
220-FileZilla Server version 0.9.32
beta7/26/2010 12:40:23 PM - (not
logged in) (xx.xx.xxx.xxx)> 220
ftp.xxxxxxxxxx.com7/26/2010 12:40:23 PM - (not
logged in) (xx.xx.xxx.xxx)> AUTH TLS7/26/2010 12:40:24 PM - (not
logged in) (xx.xx.xxx.xxx)> 234 Using
authentication type TLS7/26/2010 12:41:24 PM - (not
logged in) (xx.xx.xxx.xxx)> 421 Login
time exceeded. Closing control
connection.7/26/2010 12:41:24 PM - (not
logged in) (xx.xx.xxx.xxx)>
disconnected.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
抱歉,我忘记带着我的解决方案回到这里 - 它是隐式 SSL 与显式 SSL。我对 FileZilla 用例使用隐式,但对 FTPWebRequest 使用显式。不幸的是,FTPWebRequest 不支持隐式,并且 NAT 在显式方面存在问题。
长话短说,我们使用了一个名为 Alex FTPS 客户端 的 FTPS 控件,它易于用于隐式或显式 ssl,易于设置,并且运行完美。
Sorry I forgot to come back here with my solution - It was implicit vs explicit SSL. I was using implicit for the FileZilla use case but explicit for the FTPWebRequest. Unfortunately, FTPWebRequest doesn't support implicit and the NAT was having problems with explicit.
Long story short, we went with a FTPS control called Alex FTPS client that is easy to use for either implicit or explicit ssl, easy to setup, and works flawlessly.
可能是服务器在 TLS/SSL 协商期间发送的证书存在问题,即不被操作系统接受等。
尝试运行Wireshark来检查客户端和服务器之间实际发送了哪些数据。
Maybe, there is a problem in certificate, which server sends during TLS/SSL negotiation, i.e. it is not accepted by operating system, or so on.
Try to run Wireshark to check, which data is actually sent between client and server.